summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2008-08-02 18:51:06 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-08-02 18:51:06 -0400
commitd5a0d4f732af3438e592efab4cb80076d1dd81b5 (patch)
treef156408767d8f59ecf991b3f71b51531c04d8f06 /fs/ext4/inode.c
parente9e34f4e8f42177c66754fec1edfd35e70c18f99 (diff)
downloadop-kernel-dev-d5a0d4f732af3438e592efab4cb80076d1dd81b5.zip
op-kernel-dev-d5a0d4f732af3438e592efab4cb80076d1dd81b5.tar.gz
ext4: fix ext4_da_write_begin error path
ext4_da_write_begin needs to call journal_stop before returning, if the page allocation fails. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index efe8caa..37f834b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2280,8 +2280,11 @@ retry:
}
page = __grab_cache_page(mapping, index);
- if (!page)
- return -ENOMEM;
+ if (!page) {
+ ext4_journal_stop(handle);
+ ret = -ENOMEM;
+ goto out;
+ }
*pagep = page;
ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
OpenPOWER on IntegriCloud