diff options
author | Daniel Rosenberg <drosen@google.com> | 2016-10-26 16:33:11 -0700 |
---|---|---|
committer | Daniel Rosenberg <drosen@google.com> | 2017-01-26 15:53:30 -0800 |
commit | 1cbf8e31e3a7440a3ada22ba06f62d6359c27c0e (patch) | |
tree | 01bdcaf58aa4442d079b6cc720c336fb4186a567 /fs/inode.c | |
parent | 21fc44e40ae3c574c288159846ab5a4762bd0e3f (diff) |
ANDROID: 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 1be5f9003eb3..aa3cf5a1b819 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1715,7 +1715,7 @@ int dentry_needs_remove_privs(struct dentry *dentry) } EXPORT_SYMBOL(dentry_needs_remove_privs); -static int __remove_privs(struct dentry *dentry, int kill) +static int __remove_privs(struct vfsmount *mnt, struct dentry *dentry, int kill) { struct iattr newattrs; @@ -1724,7 +1724,7 @@ static int __remove_privs(struct dentry *dentry, int kill) * Note we call this on write, so notify_change will not * encounter any conflicting delegations: */ - return notify_change(dentry, &newattrs, NULL); + return notify_change2(mnt, dentry, &newattrs, NULL); } /* @@ -1746,7 +1746,7 @@ int file_remove_privs(struct file *file) if (kill < 0) return kill; if (kill) - error = __remove_privs(dentry, kill); + error = __remove_privs(file->f_path.mnt, dentry, kill); if (!error) inode_has_no_xattr(inode); |