Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292394
b: refs/heads/master
c: 58884c4
h: refs/heads/master
v: v3
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 5, 2012
1 parent d5cd12a commit 1a33660
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6aad1c3d3eba3db38b3a1200e2b02ff3af501c5a
refs/heads/master: 58884c4df005ee5ee854cfcd0385d5a6bf25aa30
14 changes: 4 additions & 10 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk, bool exact)
struct rb_node *n, *next;
struct gfs2_rgrpd *cur;

if (gfs2_rindex_update(sdp))
return NULL;

spin_lock(&sdp->sd_rindex_spin);
n = sdp->sd_rindex_tree.rb_node;
while (n) {
Expand Down Expand Up @@ -917,10 +920,6 @@ int gfs2_fitrim(struct file *filp, void __user *argp)
if (!blk_queue_discard(q))
return -EOPNOTSUPP;

ret = gfs2_rindex_update(sdp);
if (ret)
return ret;

if (argp == NULL) {
r.start = 0;
r.len = ULLONG_MAX;
Expand Down Expand Up @@ -1671,13 +1670,8 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)
{
struct gfs2_rgrpd *rgd;
struct gfs2_holder rgd_gh;
int error;

error = gfs2_rindex_update(sdp);
if (error)
return error;
int error = -EINVAL;

error = -EINVAL;
rgd = gfs2_blk2rgrpd(sdp, no_addr, 1);
if (!rgd)
goto fail;
Expand Down

0 comments on commit 1a33660

Please sign in to comment.