Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d699594d authored by Dave Hansen's avatar Dave Hansen Committed by Theodore Ts'o
Browse files

ext4: remove extra IS_RDONLY() check



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.

Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 1330593e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3275,7 +3275,7 @@ int ext4_change_inode_journal_flag(struct inode *inode, int val)
	 */
	 */


	journal = EXT4_JOURNAL(inode);
	journal = EXT4_JOURNAL(inode);
	if (is_journal_aborted(journal) || IS_RDONLY(inode))
	if (is_journal_aborted(journal))
		return -EROFS;
		return -EROFS;


	jbd2_journal_lock_updates(journal);
	jbd2_journal_lock_updates(journal);