From: Linus Torvalds Date: Tue, 27 Apr 2021 17:57:42 +0000 (-0700) Subject: Merge branch 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: accepted/tizen/unified/20230118.172025~7385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1466bc583a81830cef2399a4b8a514398351b40;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'work.inode-type-fixes' of git://git./linux/kernel/git/viro/vfs Pull vfs inode type handling updates from Al Viro: "We should never change the type bits of ->i_mode or the method tables (->i_op and ->i_fop) of a live inode. Unfortunately, not all filesystems took care to prevent that" * 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: spufs: fix bogosity in S_ISGID handling 9p: missing chunk of "fs/9p: Don't update file type when updating file attributes" openpromfs: don't do unlock_new_inode() until the new inode is set up hostfs_mknod(): don't bother with init_special_inode() cifs: have cifs_fattr_to_inode() refuse to change type on live inode cifs: have ->mkdir() handle race with another client sanely do_cifs_create(): don't set ->i_mode of something we had not created gfs2: be careful with inode refresh ocfs2_inode_lock_update(): make sure we don't change the type bits of i_mode orangefs_inode_is_stale(): i_mode type bits do *not* form a bitmap... vboxsf: don't allow to change the inode type afs: Fix updating of i_mode due to 3rd party change ceph: don't allow type or device number to change on non-I_NEW inodes ceph: fix up error handling with snapdirs new helper: inode_wrong_type() --- d1466bc583a81830cef2399a4b8a514398351b40 diff --cc fs/cifs/file.c index 3d4e6e7,78266f0..639c595 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@@ -165,8 -165,7 +165,8 @@@ int cifs_posix_open(const char *full_pa goto posix_open_ret; } } else { + cifs_revalidate_mapping(*pinode); - cifs_fattr_to_inode(*pinode, &fattr); + rc = cifs_fattr_to_inode(*pinode, &fattr); } posix_open_ret: