From a06d560b723356dfbbb352222e2a8b566c7bd647 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 26 Feb 2009 00:57:35 -0500 Subject: [PATCH] --- yaml --- r: 131917 b: refs/heads/master c: 8f64b32eb73fbfe9f38c4123121b63ee409278a7 h: refs/heads/master i: 131915: 34fdc21070703c629fa52bb643297a12d28a1a50 v: v3 --- [refs] | 2 +- trunk/fs/ext4/balloc.c | 4 +++- trunk/fs/ext4/inode.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 94587b56f1d7..98f26feb328e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d8ae4601a4b7ea1fa17fa395c3468c0e144d1275 +refs/heads/master: 8f64b32eb73fbfe9f38c4123121b63ee409278a7 diff --git a/trunk/fs/ext4/balloc.c b/trunk/fs/ext4/balloc.c index 9a50b8052dcf..de9459b4cb94 100644 --- a/trunk/fs/ext4/balloc.c +++ b/trunk/fs/ext4/balloc.c @@ -609,7 +609,9 @@ int ext4_claim_free_blocks(struct ext4_sb_info *sbi, */ int ext4_should_retry_alloc(struct super_block *sb, int *retries) { - if (!ext4_has_free_blocks(EXT4_SB(sb), 1) || (*retries)++ > 3) + if (!ext4_has_free_blocks(EXT4_SB(sb), 1) || + (*retries)++ > 3 || + !EXT4_SB(sb)->s_journal) return 0; jbd_debug(1, "%s: retrying operation after ENOSPC\n", sb->s_id); diff --git a/trunk/fs/ext4/inode.c b/trunk/fs/ext4/inode.c index 51cdd13e1c31..c7fed5b18745 100644 --- a/trunk/fs/ext4/inode.c +++ b/trunk/fs/ext4/inode.c @@ -2544,7 +2544,7 @@ static int ext4_da_writepages(struct address_space *mapping, ext4_journal_stop(handle); - if (mpd.retval == -ENOSPC) { + if ((mpd.retval == -ENOSPC) && sbi->s_journal) { /* commit the transaction which would * free blocks released in the transaction * and try again