From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 15/15] vfs: splice remove_suid() cleanup Date: Mon, 5 May 2008 07:11:23 -0400 Message-ID: <20080505111123.GG20910@infradead.org> References: <20080505095440.820370974@szeredi.hu> <20080505095532.980827078@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, hch@infradead.org, viro@ZenIV.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: <20080505095532.980827078@szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, May 05, 2008 at 11:54:56AM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > generic_file_splice_write() duplicates remove_suid() just because it > doesn't hold i_mutex. But it grabs i_mutex inside splice_from_pipe() > anyway, so this is rather pointless. > > Move locking to generic_file_splice_write() and call remove_suid() and > __splice_from_pipe() instead. Looks good to me. I wonder whether we should kill splice_from_pipe entirely and always leave the locking to the caller.