diff options
| author | Daniel Rosenberg <drosen@google.com> | 2016-10-26 16:33:11 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:15 +0200 |
| commit | dc2f8837fb5a44523e8925cf46d94b0ab2d15010 (patch) | |
| tree | 40cc3ea5ccea4b8aac1f575040844cc24e2602fc /fs/inode.c | |
| parent | be199f96bcc2c4f544429809829d5604896b2952 (diff) | |
vfs: Add setattr2 for filesystems with per mount permissions
This allows filesystems to use their mount private data to
influence the permssions they use in setattr2. It has
been separated into a new call to avoid disrupting current
setattr users.
Change-Id: I19959038309284448f1b7f232d579674ef546385
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Diffstat (limited to 'fs/inode.c')
| -rw-r--r-- | fs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c index 1d2ce8351..9cd3598d7 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1602,12 +1602,12 @@ int should_remove_suid(struct dentry *dentry) } EXPORT_SYMBOL(should_remove_suid); -static int __remove_suid(struct dentry *dentry, int kill) +static int __remove_suid(struct vfsmount *mnt, struct dentry *dentry, int kill) { struct iattr newattrs; newattrs.ia_valid = ATTR_FORCE | kill; - return notify_change(dentry, &newattrs); + return notify_change2(mnt, dentry, &newattrs); } int file_remove_suid(struct file *file) @@ -1630,7 +1630,7 @@ int file_remove_suid(struct file *file) if (killpriv) error = security_inode_killpriv(dentry); if (!error && killsuid) - error = __remove_suid(dentry, killsuid); + error = __remove_suid(file->f_path.mnt, dentry, killsuid); if (!error) inode_has_no_xattr(inode); |
