From 666e948b4a3407d0dea46137acf3d6729b67d169 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Thu, 23 Aug 2012 13:43:40 +0100 Subject: [PATCH] --- yaml --- r: 323280 b: refs/heads/master c: 137834a696fd51ef8c710a0ad854b585027c7df0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/gfs2/rgrp.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2e82df0f3e36..eff146b88947 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b9731e8bb1bdc6b9da149f4e482a071747207f3 +refs/heads/master: 137834a696fd51ef8c710a0ad854b585027c7df0 diff --git a/trunk/fs/gfs2/rgrp.c b/trunk/fs/gfs2/rgrp.c index 55a2651666c9..30c864e70298 100644 --- a/trunk/fs/gfs2/rgrp.c +++ b/trunk/fs/gfs2/rgrp.c @@ -2012,6 +2012,11 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks, gfs2_rbm_from_block(&rbm, goal); error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, ip, false); + if (error == -ENOSPC) { + gfs2_rbm_from_block(&rbm, goal); + error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, false); + } + /* Since all blocks are reserved in advance, this shouldn't happen */ if (error) { fs_warn(sdp, "error=%d, nblocks=%u, full=%d\n", error, *nblocks,