Patch "f2fs: fix to check pinfile flag in f2fs_move_file_range()" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    f2fs: fix to check pinfile flag in f2fs_move_file_range()

to the 6.8-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-check-pinfile-flag-in-f2fs_move_file_ran.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 911dc36a67123e9996fc7391a424177e697b1f5d
Author: Chao Yu <chao@xxxxxxxxxx>
Date:   Wed Apr 3 22:24:20 2024 +0800

    f2fs: fix to check pinfile flag in f2fs_move_file_range()
    
    [ Upstream commit e07230da0500e0919a765037c5e81583b519be2c ]
    
    ioctl(F2FS_IOC_MOVE_RANGE) can truncate or punch hole on pinned file,
    fix to disallow it.
    
    Fixes: 5fed0be8583f ("f2fs: do not allow partial truncation on pinned file")
    Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
    Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index fb6c3777ef1a8..449e6f1625033 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2819,7 +2819,8 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
 			goto out;
 	}
 
-	if (f2fs_compressed_file(src) || f2fs_compressed_file(dst)) {
+	if (f2fs_compressed_file(src) || f2fs_compressed_file(dst) ||
+		f2fs_is_pinned_file(src) || f2fs_is_pinned_file(dst)) {
 		ret = -EOPNOTSUPP;
 		goto out_unlock;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux