diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
commit | f407a8258610169cd8e975dba7f0b2824562014c (patch) | |
tree | 6c87b2d168a4665411a9e16b9f481599f2db25bc /fs/cifs/inode.c | |
parent | 960d447b94b22ceba286917056871d1dac8da697 (diff) | |
parent | c46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff) |
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
arch/sparc/include/asm/topology_64.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 55b58112d122..f621b44cb800 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -373,8 +373,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
373 | 373 | ||
374 | /* could have done a find first instead but this returns more info */ | 374 | /* could have done a find first instead but this returns more info */ |
375 | rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data, | 375 | rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data, |
376 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 376 | cifs_sb->local_nls, cifs_remap(cifs_sb)); |
377 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
378 | cifs_put_tlink(tlink); | 377 | cifs_put_tlink(tlink); |
379 | 378 | ||
380 | if (!rc) { | 379 | if (!rc) { |
@@ -402,9 +401,25 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
402 | rc = -ENOMEM; | 401 | rc = -ENOMEM; |
403 | } else { | 402 | } else { |
404 | /* we already have inode, update it */ | 403 | /* we already have inode, update it */ |
404 | |||
405 | /* if uniqueid is different, return error */ | ||
406 | if (unlikely(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM && | ||
407 | CIFS_I(*pinode)->uniqueid != fattr.cf_uniqueid)) { | ||
408 | rc = -ESTALE; | ||
409 | goto cgiiu_exit; | ||
410 | } | ||
411 | |||
412 | /* if filetype is different, return error */ | ||
413 | if (unlikely(((*pinode)->i_mode & S_IFMT) != | ||
414 | (fattr.cf_mode & S_IFMT))) { | ||
415 | rc = -ESTALE; | ||
416 | goto cgiiu_exit; | ||
417 | } | ||
418 | |||
405 | cifs_fattr_to_inode(*pinode, &fattr); | 419 | cifs_fattr_to_inode(*pinode, &fattr); |
406 | } | 420 | } |
407 | 421 | ||
422 | cgiiu_exit: | ||
408 | return rc; | 423 | return rc; |
409 | } | 424 | } |
410 | 425 | ||
@@ -839,6 +854,15 @@ cifs_get_inode_info(struct inode **inode, const char *full_path, | |||
839 | if (!*inode) | 854 | if (!*inode) |
840 | rc = -ENOMEM; | 855 | rc = -ENOMEM; |
841 | } else { | 856 | } else { |
857 | /* we already have inode, update it */ | ||
858 | |||
859 | /* if filetype is different, return error */ | ||
860 | if (unlikely(((*inode)->i_mode & S_IFMT) != | ||
861 | (fattr.cf_mode & S_IFMT))) { | ||
862 | rc = -ESTALE; | ||
863 | goto cgii_exit; | ||
864 | } | ||
865 | |||
842 | cifs_fattr_to_inode(*inode, &fattr); | 866 | cifs_fattr_to_inode(*inode, &fattr); |
843 | } | 867 | } |
844 | 868 | ||
@@ -2215,8 +2239,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) | |||
2215 | pTcon = tlink_tcon(tlink); | 2239 | pTcon = tlink_tcon(tlink); |
2216 | rc = CIFSSMBUnixSetPathInfo(xid, pTcon, full_path, args, | 2240 | rc = CIFSSMBUnixSetPathInfo(xid, pTcon, full_path, args, |
2217 | cifs_sb->local_nls, | 2241 | cifs_sb->local_nls, |
2218 | cifs_sb->mnt_cifs_flags & | 2242 | cifs_remap(cifs_sb)); |
2219 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
2220 | cifs_put_tlink(tlink); | 2243 | cifs_put_tlink(tlink); |
2221 | } | 2244 | } |
2222 | 2245 | ||