ext4: fix flags validity checking for EXT4_IOC_CHECKPOINT

Use the correct bitmask when checking for any not-yet-supported flags.

Link: https://lore.kernel.org/r/20210702173425.1276158-1-tytso@mit.edu
Fixes: 351a0a3fbc ("ext4: add ioctl EXT4_IOC_CHECKPOINT")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Leah Rumancik <leah.rumancik@gmail.com>
This commit is contained in:
Theodore Ts'o 2021-07-02 13:21:06 -04:00
Родитель 61bb4a1c41
Коммит 0955901908
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -823,7 +823,7 @@ static int ext4_ioctl_checkpoint(struct file *filp, unsigned long arg)
if (!EXT4_SB(sb)->s_journal) if (!EXT4_SB(sb)->s_journal)
return -ENODEV; return -ENODEV;
if (flags & ~JBD2_JOURNAL_FLUSH_VALID) if (flags & ~EXT4_IOC_CHECKPOINT_FLAG_VALID)
return -EINVAL; return -EINVAL;
q = bdev_get_queue(EXT4_SB(sb)->s_journal->j_dev); q = bdev_get_queue(EXT4_SB(sb)->s_journal->j_dev);