aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2014-03-19 11:51:28 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2014-03-19 11:53:52 -0400
commit733dbc1b21dcfac83b292865a707d6a0d0fc16eb (patch)
tree2ed5b83f7c753500d85f893217eff7da39e7b4f0
parentf45dc26deda00d77ae96b11612c353fff7d93e09 (diff)
GFS2: inline function gfs2_set_mode
Here is a revised patch based on Steve's feedback: This patch eliminates function gfs2_set_mode which was only called in one place, and always returned 0. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/gfs2/acl.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 394dc5561842..3088e2a38e30 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -64,18 +64,6 @@ struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
64 return acl; 64 return acl;
65} 65}
66 66
67static int gfs2_set_mode(struct inode *inode, umode_t mode)
68{
69 int error = 0;
70
71 if (mode != inode->i_mode) {
72 inode->i_mode = mode;
73 mark_inode_dirty(inode);
74 }
75
76 return error;
77}
78
79int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) 67int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
80{ 68{
81 int error; 69 int error;
@@ -98,9 +86,10 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
98 if (error == 0) 86 if (error == 0)
99 acl = NULL; 87 acl = NULL;
100 88
101 error = gfs2_set_mode(inode, mode); 89 if (mode != inode->i_mode) {
102 if (error) 90 inode->i_mode = mode;
103 return error; 91 mark_inode_dirty(inode);
92 }
104 } 93 }
105 94
106 if (acl) { 95 if (acl) {