|
@@ -772,6 +772,11 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset,
|
|
if (bytes == 0)
|
|
if (bytes == 0)
|
|
bytes = sdp->sd_sb.sb_bsize;
|
|
bytes = sdp->sd_sb.sb_bsize;
|
|
|
|
|
|
|
|
+ error = gfs2_rindex_update(sdp);
|
|
|
|
+ if (error) {
|
|
|
|
+ fs_warn(sdp, "rindex update returns %d\n", error);
|
|
|
|
+ return error;
|
|
|
|
+ }
|
|
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh);
|
|
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh);
|
|
error = gfs2_glock_nq(&ip->i_gh);
|
|
error = gfs2_glock_nq(&ip->i_gh);
|
|
if (unlikely(error))
|
|
if (unlikely(error))
|