diff options
-rw-r--r-- | fs/gfs2/rgrp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 55a2651666c..30c864e7029 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -2012,6 +2012,11 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks, | |||
2012 | gfs2_rbm_from_block(&rbm, goal); | 2012 | gfs2_rbm_from_block(&rbm, goal); |
2013 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, ip, false); | 2013 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, ip, false); |
2014 | 2014 | ||
2015 | if (error == -ENOSPC) { | ||
2016 | gfs2_rbm_from_block(&rbm, goal); | ||
2017 | error = gfs2_rbm_find(&rbm, GFS2_BLKST_FREE, NULL, false); | ||
2018 | } | ||
2019 | |||
2015 | /* Since all blocks are reserved in advance, this shouldn't happen */ | 2020 | /* Since all blocks are reserved in advance, this shouldn't happen */ |
2016 | if (error) { | 2021 | if (error) { |
2017 | fs_warn(sdp, "error=%d, nblocks=%u, full=%d\n", error, *nblocks, | 2022 | fs_warn(sdp, "error=%d, nblocks=%u, full=%d\n", error, *nblocks, |