Skip to contentSkip to conversation

ext4: remove redundant checking in ext4_ioctl_checkpoint

PATCH Applied Guoqing Jiang 2 participants 2 messages Sep 18, 2022 – Sep 30, 2022 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: remove redundant checking in ext4_ioctl_checkpoint

It is already checked after comment "check for invalid bits set", so let's remove this one.

---
 fs/ext4/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ext4/ioctl.c +0 -3
index 3cf3ec4b1c21..80678af1fa7c 100644
@@ -1060,9 +1060,6 @@ static int ext4_ioctl_checkpoint(struct file *filp, unsigned long arg)
 	if (!EXT4_SB(sb)->s_journal)
 		return -ENODEV;
 
-	if (flags & ~EXT4_IOC_CHECKPOINT_FLAG_VALID)
-		return -EINVAL;
-
 	if ((flags & JBD2_JOURNAL_FLUSH_DISCARD) &&
 	    !bdev_max_discard_sectors(EXT4_SB(sb)->s_journal->j_dev))
 		return -EOPNOTSUPP;
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Guoqing Jiang

It is already checked after comment "check for invalid bits set", so let's remove this one.

Applied, thanks!

[1/1] ext4: remove redundant checking in ext4_ioctl_checkpoint

      commit: 0a13172182a4d896bddfb42c06c85199fc526104

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>