lkml.org 
[lkml]   [2008]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: no way to swapoff a deleted swap file?
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.


\
 
 \ /
  Last update: 2008-10-18 22:53    [W:0.067 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site