Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbYJRUuT (ORCPT ); Sat, 18 Oct 2008 16:50:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751073AbYJRUuG (ORCPT ); Sat, 18 Oct 2008 16:50:06 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:52129 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbYJRUuF (ORCPT ); Sat, 18 Oct 2008 16:50:05 -0400 Date: Sat, 18 Oct 2008 16:49:48 -0400 From: Christoph Hellwig 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 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: User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 818 Lines: 19 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/