diff options
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/attr.c b/fs/attr.c index ee697ddc6c2e..775154096e47 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -17,22 +17,19 @@ #include <linux/ima.h> /** - * setattr_prepare - check if attribute changes to a dentry are allowed - * @dentry: dentry to check + * inode_change_ok - check if attribute changes to an inode are allowed + * @inode: inode to check * @attr: attributes to change * * Check if we are allowed to change the attributes contained in @attr - * in the given dentry. This includes the normal unix access permission - * checks, as well as checks for rlimits and others. The function also clears - * SGID bit from mode if user is not allowed to set it. Also file capabilities - * and IMA extended attributes are cleared if ATTR_KILL_PRIV is set. + * in the given inode. This includes the normal unix access permission + * checks, as well as checks for rlimits and others. * * Should be called as the first thing in ->setattr implementations, * possibly after taking additional locks. */ -int setattr_prepare(struct dentry *dentry, struct iattr *attr) +int inode_change_ok(const struct inode *inode, struct iattr *attr) { - struct inode *inode = d_inode(dentry); unsigned int ia_valid = attr->ia_valid; /* @@ -92,7 +89,7 @@ kill_priv: return 0; } -EXPORT_SYMBOL(setattr_prepare); +EXPORT_SYMBOL(inode_change_ok); /** * inode_newsize_ok - may this inode be truncated to a given size |