From 85ff872d3f4a62d076d698bd1fa15ca2a4d7c100 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Tue, 28 Sep 2010 00:27:39 +0530 Subject: fs/9p: Implement POSIX ACL permission checking function The ACL value is fetched as a part of inode initialization from the server and the permission checking function use the cached value of the ACL Signed-off-by: Aneesh Kumar K.V Signed-off-by: Venkateswararao Jujjuri Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_super.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'fs/9p/vfs_super.c') diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 1d12ba0ed3d..14da5778d44 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -46,6 +46,7 @@ #include "v9fs_vfs.h" #include "fid.h" #include "xattr.h" +#include "acl.h" static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl; @@ -88,6 +89,10 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | MS_NOATIME; +#ifdef CONFIG_9P_FS_POSIX_ACL + sb->s_flags |= MS_POSIXACL; +#endif + save_mount_options(sb, data); } @@ -149,7 +154,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, goto release_sb; } sb->s_root = root; - if (v9fs_proto_dotl(v9ses)) { struct p9_stat_dotl *st = NULL; st = p9_client_getattr_dotl(fid, P9_STATS_BASIC); @@ -174,6 +178,9 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, p9stat_free(st); kfree(st); } + retval = v9fs_get_acl(inode, fid); + if (retval) + goto release_sb; v9fs_fid_add(root, fid); -- cgit v1.2.3