]> git.itanic.dy.fi Git - linux-stable/commit
new helper: inode_wrong_type()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Mar 2021 01:37:10 +0000 (20:37 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Mar 2021 15:19:35 +0000 (10:19 -0500)
commit6e3e2c4362e41a2f18e3f7a5ad81bd2f49a47b85
treeef51a46d8ebbfa4300e6fa4f1c20b171b351bf13
parenta38fd8748464831584a19438cbb3082b5a2dab15
new helper: inode_wrong_type()

inode_wrong_type(inode, mode) returns true if setting inode->i_mode
to given value would've changed the inode type.  We have enough of
those checks open-coded to make a helper worthwhile.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/cifs/inode.c
fs/fuse/dir.c
fs/fuse/inode.c
fs/fuse/readdir.c
fs/nfs/inode.c
fs/nfsd/nfsproc.c
fs/overlayfs/namei.c
include/linux/fs.h