Skip to contentSkip to conversation

Patch "f2fs: fix to clear FI_NO_PREALLOC" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 12, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

f2fs: fix to clear FI_NO_PREALLOC

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
f2fs-fix-to-clear-fi_no_prealloc.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Dec 12 10:32:42 CET 2017

From: Chao Yu <[email protected]>
Date: Mon, 13 Nov 2017 17:32:39 +0800
Subject: f2fs: fix to clear FI_NO_PREALLOC

From: Chao Yu <[email protected]>

[ Upstream commit 28cfafb73853f0494b06649716687a3ea07681d5 ]

We need to clear FI_NO_PREALLOC flag in error path of f2fs_file_write_iter, otherwise we will lose the chance to preallocate blocks in latter write() at one time.

Fixes dc91de78e5e1 ("f2fs: do not preallocate blocks which has wrong buffer")
---
 fs/f2fs/file.c |    1 +
 1 file changed, 1 insertion(+)
fs/f2fs/file.c +1 -0
@@ -2697,6 +2697,7 @@ static ssize_t f2fs_file_write_iter(stru
 
 		err = f2fs_preallocate_blocks(iocb, from);
 		if (err) {
+			clear_inode_flag(inode, FI_NO_PREALLOC);
 			inode_unlock(inode);
 			return err;
 		}

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/f2fs-fix-to-clear-fi_no_prealloc.patch