Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
0f235cae
Commit
0f235cae
authored
12 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
9p: switch v9fs_set_acl() from dentry to fid
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
7f165aaa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/9p/acl.c
+12
-5
12 additions, 5 deletions
fs/9p/acl.c
with
12 additions
and
5 deletions
fs/9p/acl.c
+
12
−
5
View file @
0f235cae
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include
"acl.h"
#include
"acl.h"
#include
"v9fs.h"
#include
"v9fs.h"
#include
"v9fs_vfs.h"
#include
"v9fs_vfs.h"
#include
"fid.h"
static
struct
posix_acl
*
__v9fs_get_acl
(
struct
p9_fid
*
fid
,
char
*
name
)
static
struct
posix_acl
*
__v9fs_get_acl
(
struct
p9_fid
*
fid
,
char
*
name
)
{
{
...
@@ -113,7 +114,7 @@ struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type)
...
@@ -113,7 +114,7 @@ struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type)
}
}
static
int
v9fs_set_acl
(
struct
dentry
*
dentry
,
int
type
,
struct
posix_acl
*
acl
)
static
int
v9fs_set_acl
(
struct
p9_fid
*
fid
,
int
type
,
struct
posix_acl
*
acl
)
{
{
int
retval
;
int
retval
;
char
*
name
;
char
*
name
;
...
@@ -140,7 +141,7 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl)
...
@@ -140,7 +141,7 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl)
default:
default:
BUG
();
BUG
();
}
}
retval
=
v9fs_xattr_set
(
dentry
,
name
,
buffer
,
size
,
0
);
retval
=
v9fs_
fid_
xattr_set
(
fid
,
name
,
buffer
,
size
,
0
);
err_free_out:
err_free_out:
kfree
(
buffer
);
kfree
(
buffer
);
return
retval
;
return
retval
;
...
@@ -151,16 +152,19 @@ int v9fs_acl_chmod(struct dentry *dentry)
...
@@ -151,16 +152,19 @@ int v9fs_acl_chmod(struct dentry *dentry)
int
retval
=
0
;
int
retval
=
0
;
struct
posix_acl
*
acl
;
struct
posix_acl
*
acl
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
p9_fid
*
fid
=
v9fs_fid_lookup
(
dentry
);
if
(
S_ISLNK
(
inode
->
i_mode
))
if
(
S_ISLNK
(
inode
->
i_mode
))
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
if
(
IS_ERR
(
fid
))
return
PTR_ERR
(
fid
);
acl
=
v9fs_get_cached_acl
(
inode
,
ACL_TYPE_ACCESS
);
acl
=
v9fs_get_cached_acl
(
inode
,
ACL_TYPE_ACCESS
);
if
(
acl
)
{
if
(
acl
)
{
retval
=
posix_acl_chmod
(
&
acl
,
GFP_KERNEL
,
inode
->
i_mode
);
retval
=
posix_acl_chmod
(
&
acl
,
GFP_KERNEL
,
inode
->
i_mode
);
if
(
retval
)
if
(
retval
)
return
retval
;
return
retval
;
set_cached_acl
(
inode
,
ACL_TYPE_ACCESS
,
acl
);
set_cached_acl
(
inode
,
ACL_TYPE_ACCESS
,
acl
);
retval
=
v9fs_set_acl
(
dentry
,
ACL_TYPE_ACCESS
,
acl
);
retval
=
v9fs_set_acl
(
fid
,
ACL_TYPE_ACCESS
,
acl
);
posix_acl_release
(
acl
);
posix_acl_release
(
acl
);
}
}
return
retval
;
return
retval
;
...
@@ -170,10 +174,13 @@ int v9fs_set_create_acl(struct dentry *dentry,
...
@@ -170,10 +174,13 @@ int v9fs_set_create_acl(struct dentry *dentry,
struct
posix_acl
**
dpacl
,
struct
posix_acl
**
pacl
)
struct
posix_acl
**
dpacl
,
struct
posix_acl
**
pacl
)
{
{
if
(
dentry
)
{
if
(
dentry
)
{
struct
p9_fid
*
fid
=
v9fs_fid_lookup
(
dentry
);
set_cached_acl
(
dentry
->
d_inode
,
ACL_TYPE_DEFAULT
,
*
dpacl
);
set_cached_acl
(
dentry
->
d_inode
,
ACL_TYPE_DEFAULT
,
*
dpacl
);
v9fs_set_acl
(
dentry
,
ACL_TYPE_DEFAULT
,
*
dpacl
);
set_cached_acl
(
dentry
->
d_inode
,
ACL_TYPE_ACCESS
,
*
pacl
);
set_cached_acl
(
dentry
->
d_inode
,
ACL_TYPE_ACCESS
,
*
pacl
);
v9fs_set_acl
(
dentry
,
ACL_TYPE_ACCESS
,
*
pacl
);
if
(
!
IS_ERR
(
fid
))
{
v9fs_set_acl
(
fid
,
ACL_TYPE_DEFAULT
,
*
dpacl
);
v9fs_set_acl
(
fid
,
ACL_TYPE_ACCESS
,
*
pacl
);
}
}
}
posix_acl_release
(
*
dpacl
);
posix_acl_release
(
*
dpacl
);
posix_acl_release
(
*
pacl
);
posix_acl_release
(
*
pacl
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment