cifs: always revalidate hardlinked inodes when using noserverino
authorJeff Layton <jlayton@redhat.com>
Mon, 17 May 2010 18:51:49 +0000 (14:51 -0400)
committerSteve French <sfrench@us.ibm.com>
Mon, 17 May 2010 20:55:58 +0000 (20:55 +0000)
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>
fs/cifs/inode.c

index 5b042fc4645029cfce2185dbcc61d13668d4300b..8e05e8a0ff8b686cbe1026f652ec38d676fe1aa4 100644 (file)
@@ -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;
 }