From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: [PATCH 02/26] ext3: remove extra IS_RDONLY() check Date: Fri, 22 Jun 2007 13:03:05 -0700 Message-ID: <20070622200305.F066FCB4@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 e6.ny.us.ibm.com ([32.97.182.146]:46772 "EHLO e6.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbXFVUDI (ORCPT ); Fri, 22 Jun 2007 16:03:08 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l5MK4GeO016696 for ; Fri, 22 Jun 2007 16:04:16 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5MK38lw558262 for ; Fri, 22 Jun 2007 16:03:08 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5MK37uW013731 for ; Fri, 22 Jun 2007 16:03:08 -0400 In-Reply-To: <20070622200303.82D9CC3A@kernel> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org ext3_change_inode_journal_flag() is only called from one location: ext3_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/ext3/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ext3/inode.c~ext3-extra-ro-check fs/ext3/inode.c --- lxc/fs/ext3/inode.c~ext3-extra-ro-check 2007-06-21 23:23:11.000000000 -0700 +++ lxc-dave/fs/ext3/inode.c 2007-06-21 23:23:12.000000000 -0700 @@ -3182,7 +3182,7 @@ int ext3_change_inode_journal_flag(struc */ journal = EXT3_JOURNAL(inode); - if (is_journal_aborted(journal) || IS_RDONLY(inode)) + if (is_journal_aborted(journal)) return -EROFS; journal_lock_updates(journal); _