commit | 40ba433a85dbbf5b2e58f2ac6b161ce37ac872fc | [log] [tgz] |
---|---|---|
author | Al Viro <viro@zeniv.linux.org.uk> | Mon Mar 01 20:37:10 2021 -0500 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Wed Sep 08 08:49:01 2021 +0200 |
tree | 841eff9e26bce82bf4111c4c4f0ca748660fc7f6 | |
parent | ded9137fcf0d729dbe65aa98c411352f40b22970 [diff] |
new helper: inode_wrong_type() commit 6e3e2c4362e41a2f18e3f7a5ad81bd2f49a47b85 upstream. 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> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>