summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-05-17 14:51:49 -0400
committerSteve French <sfrench@us.ibm.com>2010-05-17 20:55:58 +0000
commitdb19272edc93661835bf6ec9736cfd0754aa3c62 (patch)
tree5de9dccbf2a234db5c5ba3e7c49d3ccf4af50536
parentade275c4b6db98ae7b197cc7c6bdd73567a975c2 (diff)
cifs: always revalidate hardlinked inodes when using noserverino
The old cifs_revalidate logic always revalidated hardlinked inodes. This hack allowed CIFS to pass some connectathon tests when server inode numbers aren't used (basic test7, in particular). Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/inode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 5b042fc46450..8e05e8a0ff8b 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1528,6 +1528,11 @@ cifs_inode_needs_reval(struct inode *inode)
if (time_after_eq(jiffies, cifs_i->time + HZ))
return true;
+ /* hardlinked files w/ noserverino get "special" treatment */
+ if (!(CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) &&
+ S_ISREG(inode->i_mode) && inode->i_nlink != 1)
+ return true;
+
return false;
}