diff options
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c87faf48f0a1..56987460cdae 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -391,10 +391,6 @@ static int alloc_dinode(struct gfs2_inode *dip, u64 *no_addr, u64 *generation) | |||
391 | int error; | 391 | int error; |
392 | int dblocks = 1; | 392 | int dblocks = 1; |
393 | 393 | ||
394 | error = gfs2_rindex_update(sdp); | ||
395 | if (error) | ||
396 | fs_warn(sdp, "rindex update returns %d\n", error); | ||
397 | |||
398 | error = gfs2_inplace_reserve(dip, RES_DINODE); | 394 | error = gfs2_inplace_reserve(dip, RES_DINODE); |
399 | if (error) | 395 | if (error) |
400 | goto out; | 396 | goto out; |
@@ -1035,19 +1031,15 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) | |||
1035 | struct buffer_head *bh; | 1031 | struct buffer_head *bh; |
1036 | struct gfs2_holder ghs[3]; | 1032 | struct gfs2_holder ghs[3]; |
1037 | struct gfs2_rgrpd *rgd; | 1033 | struct gfs2_rgrpd *rgd; |
1038 | int error; | 1034 | int error = -EROFS; |
1039 | 1035 | ||
1040 | error = gfs2_rindex_update(sdp); | ||
1041 | if (error) | ||
1042 | return error; | ||
1043 | gfs2_holder_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs); | 1036 | gfs2_holder_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs); |
1044 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1); | 1037 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1); |
1045 | 1038 | ||
1046 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); | 1039 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); |
1047 | if (!rgd) { | 1040 | if (!rgd) |
1048 | error = -EROFS; | ||
1049 | goto out_inodes; | 1041 | goto out_inodes; |
1050 | } | 1042 | |
1051 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); | 1043 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); |
1052 | 1044 | ||
1053 | 1045 | ||