diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-09-27 14:57:39 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-10-28 10:08:46 -0400 |
commit | 85ff872d3f4a62d076d698bd1fa15ca2a4d7c100 (patch) | |
tree | 16d74f328ccb0b81470b1fbc4cad1b37e4df7ab8 /fs/9p/vfs_super.c | |
parent | 8e44a0805fc9d77475060280136aa491aa7d7060 (diff) |
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 <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r-- | fs/9p/vfs_super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 1d12ba0ed3db..14da5778d44e 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "v9fs_vfs.h" | 46 | #include "v9fs_vfs.h" |
47 | #include "fid.h" | 47 | #include "fid.h" |
48 | #include "xattr.h" | 48 | #include "xattr.h" |
49 | #include "acl.h" | ||
49 | 50 | ||
50 | static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl; | 51 | static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl; |
51 | 52 | ||
@@ -88,6 +89,10 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, | |||
88 | sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | | 89 | sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC | |
89 | MS_NOATIME; | 90 | MS_NOATIME; |
90 | 91 | ||
92 | #ifdef CONFIG_9P_FS_POSIX_ACL | ||
93 | sb->s_flags |= MS_POSIXACL; | ||
94 | #endif | ||
95 | |||
91 | save_mount_options(sb, data); | 96 | save_mount_options(sb, data); |
92 | } | 97 | } |
93 | 98 | ||
@@ -149,7 +154,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | |||
149 | goto release_sb; | 154 | goto release_sb; |
150 | } | 155 | } |
151 | sb->s_root = root; | 156 | sb->s_root = root; |
152 | |||
153 | if (v9fs_proto_dotl(v9ses)) { | 157 | if (v9fs_proto_dotl(v9ses)) { |
154 | struct p9_stat_dotl *st = NULL; | 158 | struct p9_stat_dotl *st = NULL; |
155 | st = p9_client_getattr_dotl(fid, P9_STATS_BASIC); | 159 | 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, | |||
174 | p9stat_free(st); | 178 | p9stat_free(st); |
175 | kfree(st); | 179 | kfree(st); |
176 | } | 180 | } |
181 | retval = v9fs_get_acl(inode, fid); | ||
182 | if (retval) | ||
183 | goto release_sb; | ||
177 | 184 | ||
178 | v9fs_fid_add(root, fid); | 185 | v9fs_fid_add(root, fid); |
179 | 186 | ||