From 6d6cb0d688d0f262cb4fd5771648b0ac01d4f82c Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Wed, 8 Apr 2009 14:07:57 +0200 Subject: UBIFS: reset no_space flag after inode deletion When UBIFS runs out of space it spends a lot of time trying to find more space before returning ENOSPC. As there is no point repeating that unless something has changed, UBIFS has an optimization to record that the file system is 100% full and not try to find space. That flag was not being reset when a pending deletion was finally done. Signed-off-by: Adrian Hunter Reviewed-by: Artem Bityutskiy --- fs/ubifs/super.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/ubifs/super.c') diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index faa44f90608..f2c1c0b79f6 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -360,6 +360,11 @@ static void ubifs_delete_inode(struct inode *inode) out: if (ui->dirty) ubifs_release_dirty_inode_budget(c, ui); + else { + /* We've deleted something - clean the "no space" flags */ + c->nospace = c->nospace_rp = 0; + smp_wmb(); + } clear_inode(inode); } -- cgit v1.2.3