From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: [PATCH 03/26] ext4: remove extra IS_RDONLY() check Date: Fri, 22 Jun 2007 13:03:06 -0700 Message-ID: <20070622200306.2C5E94C4@kernel> References: <20070622200303.82D9CC3A@kernel> Cc: linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ftp.linux.org.uk, Dave Hansen To: akpm@osdl.org Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:37354 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbXFVUDK (ORCPT ); Fri, 22 Jun 2007 16:03:10 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l5MK39ea008105 for ; Fri, 22 Jun 2007 16:03:09 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5MK39fB338562 for ; Fri, 22 Jun 2007 16:03:09 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5MK38rw009981 for ; Fri, 22 Jun 2007 16:03:09 -0400 In-Reply-To: <20070622200303.82D9CC3A@kernel> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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: Dave Hansen --- lxc-dave/fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ext4/inode.c~ext4-extra-ro-check fs/ext4/inode.c --- lxc/fs/ext4/inode.c~ext4-extra-ro-check 2007-06-21 23:23:12.000000000 -0700 +++ lxc-dave/fs/ext4/inode.c 2007-06-21 23:23:12.000000000 -0700 @@ -3196,7 +3196,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); _