f2fs: fix to create selinux label during whiteout initialization
authorChao Yu <chao@kernel.org>
Wed, 7 Feb 2024 07:05:48 +0000 (15:05 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 27 Feb 2024 17:41:14 +0000 (09:41 -0800)
commit40b2d55e045222dd6de2a54a299f682e0f954b03
tree30ae45ee5a6f1e30dfeba258a054cab2adc614c4
parent2f0209f579d12bd0ea43a01a8696e30a8eeec1da
f2fs: fix to create selinux label during whiteout initialization

generic/700       - output mismatch (see /media/fstests/results//generic/700.out.bad)
    --- tests/generic/700.out 2023-03-28 10:40:42.735529223 +0000
    +++ /media/fstests/results//generic/700.out.bad 2024-02-06 04:37:56.000000000 +0000
    @@ -1,2 +1,4 @@
     QA output created by 700
    +/mnt/scratch_f2fs/f1: security.selinux: No such attribute
    +/mnt/scratch_f2fs/f2: security.selinux: No such attribute
     Silence is golden
    ...
    (Run 'diff -u /media/fstests/tests/generic/700.out /media/fstests/results//generic/700.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing kernel fix:
      70b589a37e1a xfs: add selinux labels to whiteout inodes

Previously, it missed to create selinux labels during whiteout inode
initialization, fix this issue.

Fixes: 7e01e7ad746b ("f2fs: support RENAME_WHITEOUT")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/namei.c