diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-11-06 14:18:29 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-11-06 17:04:37 -0500 |
commit | ec06aedd44541129840ed52e6165afa3796a27bf (patch) | |
tree | 3099a49ef7aac9ea14a921559ba067b230e33948 /fs/cifs/misc.c | |
parent | 7c9abfb884b8737f0afdc8a88bcea77526f0da87 (diff) |
cifs: clean up handling when server doesn't consistently support inode numbers
It's possible that a server will return a valid FileID when we query the
FILE_INTERNAL_INFO for the root inode, but then zeroed out inode numbers
when we do a FindFile with an infolevel of
SMB_FIND_FILE_ID_FULL_DIR_INFO.
In this situation turn off querying for server inode numbers, generate a
warning for the user and just generate an inode number using iunique.
Once we generate any inode number with iunique we can no longer use any
server inode numbers or we risk collisions, so ensure that we don't do
that in cifs_get_inode_info either.
Cc: Stable <stable@kernel.org>
Reported-by: Timothy Normand Miller <theosib@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 0241b25ac33f..1e25efcb55c8 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -715,3 +715,17 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen, | |||
715 | ctoUCS_out: | 715 | ctoUCS_out: |
716 | return i; | 716 | return i; |
717 | } | 717 | } |
718 | |||
719 | void | ||
720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | ||
721 | { | ||
722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | ||
723 | cifs_sb->mnt_cifs_flags &= CIFS_MOUNT_SERVER_INUM; | ||
724 | cERROR(1, ("Autodisabling the use of server inode numbers on " | ||
725 | "%s. This server doesn't seem to support them " | ||
726 | "properly. Hardlinks will not be recognized on this " | ||
727 | "mount. Consider mounting with the \"noserverino\" " | ||
728 | "option to silence this message.", | ||
729 | cifs_sb->tcon->treeName)); | ||
730 | } | ||
731 | } | ||