aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-31 15:42:17 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-31 15:42:17 -0400
commit420b9e5e45d33355471c8d2d593bb0e5d6c77421 (patch)
tree7e5e76972606c0c597e0609e65b0478b15ae64c4 /fs/gfs2/inode.c
parentb1b934d31d8a608fe69fc56d6e539548b55b0601 (diff)
[GFS2] Tidy up in various files
Tidy up some files and remove an unused routine in meta_io.h. Also added a bit of extra debugging in meta_io.h. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index e76f345517b7..9fb340984b29 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -277,8 +277,7 @@ int gfs2_dinode_dealloc(struct gfs2_inode *ip)
277 if (error) 277 if (error)
278 goto out_rindex_relse; 278 goto out_rindex_relse;
279 279
280 error = gfs2_trans_begin(sdp, RES_RG_BIT + 280 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_STATFS + RES_QUOTA, 1);
281 RES_STATFS + RES_QUOTA, 1);
282 if (error) 281 if (error)
283 goto out_rg_gunlock; 282 goto out_rg_gunlock;
284 283
@@ -522,16 +521,13 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino)
522 gfs2_trans_add_bh(ip->i_gl, bh, 1); 521 gfs2_trans_add_bh(ip->i_gl, bh, 1);
523 gfs2_inum_range_out(&ir, bh->b_data + sizeof(struct gfs2_dinode)); 522 gfs2_inum_range_out(&ir, bh->b_data + sizeof(struct gfs2_dinode));
524 523
525 out_brelse: 524out_brelse:
526 brelse(bh); 525 brelse(bh);
527 526out_end_trans:
528 out_end_trans:
529 mutex_unlock(&sdp->sd_inum_mutex); 527 mutex_unlock(&sdp->sd_inum_mutex);
530 gfs2_trans_end(sdp); 528 gfs2_trans_end(sdp);
531 529out:
532 out:
533 gfs2_glock_dq_uninit(&gh); 530 gfs2_glock_dq_uninit(&gh);
534
535 return error; 531 return error;
536} 532}
537 533
@@ -593,8 +589,7 @@ static void munge_mode_uid_gid(struct gfs2_inode *dip, unsigned int *mode,
593 unsigned int *uid, unsigned int *gid) 589 unsigned int *uid, unsigned int *gid)
594{ 590{
595 if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir && 591 if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir &&
596 (dip->i_di.di_mode & S_ISUID) && 592 (dip->i_di.di_mode & S_ISUID) && dip->i_di.di_uid) {
597 dip->i_di.di_uid) {
598 if (S_ISDIR(*mode)) 593 if (S_ISDIR(*mode))
599 *mode |= S_ISUID; 594 *mode |= S_ISUID;
600 else if (dip->i_di.di_uid != current->fsuid) 595 else if (dip->i_di.di_uid != current->fsuid)
@@ -634,10 +629,8 @@ static int alloc_dinode(struct gfs2_inode *dip, struct gfs2_inum *inum,
634 629
635out_ipreserv: 630out_ipreserv:
636 gfs2_inplace_release(dip); 631 gfs2_inplace_release(dip);
637
638out: 632out:
639 gfs2_alloc_put(dip); 633 gfs2_alloc_put(dip);
640
641 return error; 634 return error;
642} 635}
643 636
@@ -1300,7 +1293,6 @@ int gfs2_glock_nq_m_atime(unsigned int num_gh, struct gfs2_holder *ghs)
1300 } 1293 }
1301 1294
1302 kfree(p); 1295 kfree(p);
1303
1304 return error; 1296 return error;
1305} 1297}
1306 1298
@@ -1346,9 +1338,7 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr)
1346 return error; 1338 return error;
1347 1339
1348 error = __gfs2_setattr_simple(ip, attr); 1340 error = __gfs2_setattr_simple(ip, attr);
1349
1350 gfs2_trans_end(GFS2_SB(&ip->i_inode)); 1341 gfs2_trans_end(GFS2_SB(&ip->i_inode));
1351
1352 return error; 1342 return error;
1353} 1343}
1354 1344