From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 1/2] push MS_RDONLY check from ->write_super into caller Date: Wed, 6 May 2009 23:19:12 +0100 Message-ID: <20090506221912.GX8633@ZenIV.linux.org.uk> References: <20090506201605.GA19043@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:49589 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762687AbZEFWTM (ORCPT ); Wed, 6 May 2009 18:19:12 -0400 Content-Disposition: inline In-Reply-To: <20090506201605.GA19043@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 06, 2009 at 10:16:05PM +0200, Christoph Hellwig wrote: > Add a central MS_RDONLY to sync_super instead of having it in the ->write_super > methods (and even that not consistently). The other two callers are already > protected: sync_filesystems has the same s_umount protected MS_RDONLY check > and file_fsync can only be called on a writeable file descriptor. > > Also make sure to clear s_dirt if it was set on a read-only superblock to > avoid calling into these filesystems again and again. > Index: vfs-2.6/fs/affs/super.c > Index: vfs-2.6/fs/bfs/inode.c > Index: vfs-2.6/fs/ext2/super.c > Index: vfs-2.6/fs/fat/inode.c > Index: vfs-2.6/fs/hfs/super.c > Index: vfs-2.6/fs/hfsplus/super.c > Index: vfs-2.6/fs/jffs2/fs.c > Index: vfs-2.6/fs/jffs2/super.c > Index: vfs-2.6/fs/nilfs2/super.c > Index: vfs-2.6/fs/super.c > Index: vfs-2.6/fs/sysv/inode.c > Index: vfs-2.6/fs/ufs/super.c You've missed xfs. Added and applied (reiserfs, ext4 and exofs are also not touched, but they don't need a change here).