diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-11-10 10:14:57 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-11-30 05:30:19 -0500 |
commit | 2ae51ed7b548c1d943d080da617515e801ea5c3e (patch) | |
tree | b2ed48042eef41f89d8316b70bbbb6c936d3dc76 /fs/gfs2/xattr.c | |
parent | 9e55cd53728719ac3a3234a6618259ab8e203a10 (diff) |
GFS2: Clean up duplicated setattr code
While preparing the last patch I noticed that the gfs2_setattr_simple
code had been duplicated into two other places. This patch updates
those to call gfs2_setattr_simple rather than open coding it.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/xattr.c')
-rw-r--r-- | fs/gfs2/xattr.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c index ecfd40dd28ad..439b61c03262 100644 --- a/fs/gfs2/xattr.c +++ b/fs/gfs2/xattr.c | |||
@@ -1296,10 +1296,8 @@ fail: | |||
1296 | 1296 | ||
1297 | int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data) | 1297 | int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data) |
1298 | { | 1298 | { |
1299 | struct inode *inode = &ip->i_inode; | ||
1300 | struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); | 1299 | struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); |
1301 | struct gfs2_ea_location el; | 1300 | struct gfs2_ea_location el; |
1302 | struct buffer_head *dibh; | ||
1303 | int error; | 1301 | int error; |
1304 | 1302 | ||
1305 | error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, GFS2_POSIX_ACL_ACCESS, &el); | 1303 | error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, GFS2_POSIX_ACL_ACCESS, &el); |
@@ -1321,17 +1319,7 @@ int gfs2_xattr_acl_chmod(struct gfs2_inode *ip, struct iattr *attr, char *data) | |||
1321 | if (error) | 1319 | if (error) |
1322 | return error; | 1320 | return error; |
1323 | 1321 | ||
1324 | error = gfs2_meta_inode_buffer(ip, &dibh); | 1322 | error = gfs2_setattr_simple(ip, attr); |
1325 | if (error) | ||
1326 | goto out_trans_end; | ||
1327 | |||
1328 | setattr_copy(inode, attr); | ||
1329 | mark_inode_dirty(inode); | ||
1330 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | ||
1331 | gfs2_dinode_out(ip, dibh->b_data); | ||
1332 | brelse(dibh); | ||
1333 | |||
1334 | out_trans_end: | ||
1335 | gfs2_trans_end(sdp); | 1323 | gfs2_trans_end(sdp); |
1336 | return error; | 1324 | return error; |
1337 | } | 1325 | } |