From 84fd06a4993275b4b5e400bb42c2b334022a9c43 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 19 Jul 2010 18:00:17 -0400 Subject: [PATCH] --- yaml --- r: 201724 b: refs/heads/master c: f30b9c11847cb6bf1f7aa65b5c436800621a07dd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/inode.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 68a483745921..b31422b685c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9f841593ff65d2f801c7f80c4ed0955d30103f50 +refs/heads/master: f30b9c11847cb6bf1f7aa65b5c436800621a07dd diff --git a/trunk/fs/cifs/inode.c b/trunk/fs/cifs/inode.c index 2d9cd2f269eb..a15b3a9bbff4 100644 --- a/trunk/fs/cifs/inode.c +++ b/trunk/fs/cifs/inode.c @@ -724,9 +724,14 @@ cifs_find_inode(struct inode *inode, void *opaque) { struct cifs_fattr *fattr = (struct cifs_fattr *) opaque; + /* don't match inode with different uniqueid */ if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) return 0; + /* don't match inode of different type */ + if ((inode->i_mode & S_IFMT) != (fattr->cf_mode & S_IFMT)) + return 0; + /* * uh oh -- it's a directory. We can't use it since hardlinked dirs are * verboten. Disable serverino and return it as if it were found, the