From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 18 Oct 2008 16:49:48 -0400 From: Christoph Hellwig Subject: Re: no way to swapoff a deleted swap file? Message-ID: <20081018204948.GA22140@infradead.org> References: <20081018003117.GC26067@cordes.ca> <20081018051800.GO24654@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org Return-Path: To: Hugh Dickins Cc: Willy Tarreau , Peter Cordes , Bodo Eggert <7eggert@gmx.de>, David Newall , Peter Zijlstra , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm List-ID: On Sat, Oct 18, 2008 at 09:45:14PM +0100, Hugh Dickins wrote: > --- 2.6.27/fs/namei.c 2008-10-09 23:13:53.000000000 +0100 > +++ linux/fs/namei.c 2008-10-18 21:33:01.000000000 +0100 > @@ -1407,7 +1407,7 @@ static int may_delete(struct inode *dir, > if (IS_APPEND(dir)) > return -EPERM; > if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)|| > - IS_IMMUTABLE(victim->d_inode)) > + IS_IMMUTABLE(victim->d_inode) || IS_SWAPFILE(victim->d_inode)) > return -EPERM; > if (isdir) { > if (!S_ISDIR(victim->d_inode->i_mode)) Looks reasonable. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org