diff options
-rw-r--r-- | fs/ext4/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index efe8caa3811c..37f834bc7cd6 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2280,8 +2280,11 @@ retry: | |||
2280 | } | 2280 | } |
2281 | 2281 | ||
2282 | page = __grab_cache_page(mapping, index); | 2282 | page = __grab_cache_page(mapping, index); |
2283 | if (!page) | 2283 | if (!page) { |
2284 | return -ENOMEM; | 2284 | ext4_journal_stop(handle); |
2285 | ret = -ENOMEM; | ||
2286 | goto out; | ||
2287 | } | ||
2285 | *pagep = page; | 2288 | *pagep = page; |
2286 | 2289 | ||
2287 | ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | 2290 | ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, |