Merge branch 'for-5.14/core' into for-linus
[linux-2.6-microblaze.git] / fs / f2fs / file.c
index 44a4650..ceb575f 100644 (file)
@@ -1817,7 +1817,8 @@ static int f2fs_setflags_common(struct inode *inode, u32 iflags, u32 mask)
        struct f2fs_inode_info *fi = F2FS_I(inode);
        u32 masked_flags = fi->i_flags & mask;
 
-       f2fs_bug_on(F2FS_I_SB(inode), (iflags & ~mask));
+       /* mask can be shrunk by flags_valid selector */
+       iflags &= mask;
 
        /* Is it quota file? Do not allow user to mess with it */
        if (IS_NOQUOTA(inode))