diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-05-11 14:59:55 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-05-11 20:57:50 +0000 |
commit | 3d69438031b00c601c991ab447cafb7d5c3c59a6 (patch) | |
tree | f40d66a255c4169b43079252a4c96868c097ddab /fs/cifs/cifsglob.h | |
parent | 05ce7bfe547c9fa967d9cab6c37867a9cb6fb3fa (diff) | |
download | kernel_samsung_tuna-3d69438031b00c601c991ab447cafb7d5c3c59a6.zip kernel_samsung_tuna-3d69438031b00c601c991ab447cafb7d5c3c59a6.tar.gz kernel_samsung_tuna-3d69438031b00c601c991ab447cafb7d5c3c59a6.tar.bz2 |
cifs: guard against hardlinking directories
When we made serverino the default, we trusted that the field sent by the
server in the "uniqueid" field was actually unique. It turns out that it
isn't reliably so.
Samba, in particular, will just put the st_ino in the uniqueid field when
unix extensions are enabled. When a share spans multiple filesystems, it's
quite possible that there will be collisions. This is a server bug, but
when the inodes in question are a directory (as is often the case) and
there is a collision with the root inode of the mount, the result is a
kernel panic on umount.
Fix this by checking explicitly for directory inodes with the same
uniqueid. If that is the case, then we can assume that using server inode
numbers will be a problem and that they should be disabled.
Fixes Samba bugzilla 7407
Signed-off-by: Jeff Layton <jlayton@redhat.com>
CC: Stable <stable@kernel.org>
Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index ecf0ffb..0c2fd17 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -502,6 +502,7 @@ struct dfs_info3_param { #define CIFS_FATTR_DFS_REFERRAL 0x1 #define CIFS_FATTR_DELETE_PENDING 0x2 #define CIFS_FATTR_NEED_REVAL 0x4 +#define CIFS_FATTR_INO_COLLISION 0x8 struct cifs_fattr { u32 cf_flags; |