From 3592ac444017996f5a8ecf85856af0a8938e8fd1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 31 Jan 2013 13:45:39 -0500 Subject: 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() Signed-off-by: Al Viro --- fs/9p/acl.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'fs/9p/acl.c') diff --git a/fs/9p/acl.c b/fs/9p/acl.c index 5b91689ac0b..7af425f53be 100644 --- a/fs/9p/acl.c +++ b/fs/9p/acl.c @@ -166,16 +166,13 @@ int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid) return retval; } -int v9fs_set_create_acl(struct dentry *dentry, +int v9fs_set_create_acl(struct inode *inode, struct p9_fid *fid, struct posix_acl *dacl, struct posix_acl *acl) { - struct p9_fid *fid = v9fs_fid_lookup(dentry); - set_cached_acl(dentry->d_inode, ACL_TYPE_DEFAULT, dacl); - set_cached_acl(dentry->d_inode, ACL_TYPE_ACCESS, acl); - if (!IS_ERR(fid)) { - v9fs_set_acl(fid, ACL_TYPE_DEFAULT, dacl); - v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); - } + set_cached_acl(inode, ACL_TYPE_DEFAULT, dacl); + set_cached_acl(inode, ACL_TYPE_ACCESS, acl); + v9fs_set_acl(fid, ACL_TYPE_DEFAULT, dacl); + v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); return 0; } -- cgit v1.2.3-70-g09d2