diff options
| -rw-r--r-- | fs/cifs/inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 2d9cd2f269eb..a15b3a9bbff4 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -724,9 +724,14 @@ cifs_find_inode(struct inode *inode, void *opaque) | |||
| 724 | { | 724 | { |
| 725 | struct cifs_fattr *fattr = (struct cifs_fattr *) opaque; | 725 | struct cifs_fattr *fattr = (struct cifs_fattr *) opaque; |
| 726 | 726 | ||
| 727 | /* don't match inode with different uniqueid */ | ||
| 727 | if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) | 728 | if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) |
| 728 | return 0; | 729 | return 0; |
| 729 | 730 | ||
| 731 | /* don't match inode of different type */ | ||
| 732 | if ((inode->i_mode & S_IFMT) != (fattr->cf_mode & S_IFMT)) | ||
| 733 | return 0; | ||
| 734 | |||
| 730 | /* | 735 | /* |
| 731 | * uh oh -- it's a directory. We can't use it since hardlinked dirs are | 736 | * uh oh -- it's a directory. We can't use it since hardlinked dirs are |
| 732 | * verboten. Disable serverino and return it as if it were found, the | 737 | * verboten. Disable serverino and return it as if it were found, the |
