Skip to contentSkip to conversation

Morecleanups:ext4-remove-extra-is_rdonly-check

PATCH In review Mingming Cao 1 participant 1 message Jul 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 Morecleanups:ext4-remove-extra-is_rdonly-check

Subject: ext4: remove extra IS_RDONLY() check
From: Dave Hansen <[email protected]>

ext4_change_inode_journal_flag() is only called from one location:
ext4_ioctl(EXT3_IOC_SETFLAGS). That ioctl case already has a IS_RDONLY() call in it so this one is superfluous.

---

 fs/ext4/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c renamed from fs/ext4/inode.c~ext4-remove-extra-is_rdonly-check +1 -1
diff -puN fs/ext4/inode.c~ext4-remove-extra-is_rdonly-check fs/ext4/inode.c
@@ -3352,7 +3352,7 @@ int ext4_change_inode_journal_flag(struc
 	 */
 
 	journal = EXT4_JOURNAL(inode);
-	if (is_journal_aborted(journal) || IS_RDONLY(inode))
+	if (is_journal_aborted(journal))
 		return -EROFS;
 
 	jbd2_journal_lock_updates(journal);