lkml.org 
[lkml]   [2008]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 04/14] hpfs: dont call notify_change
What about down_write on i_alloc_sem --- notify change takes that and your 
patch bypasses that.

Mikulas

> From: Miklos Szeredi <mszeredi@suse.cz>
>
> hpfs_unlink() calls notify_change() to truncate the file before
> deleting. Replace with explicit call to hpfs_notify_change().
>
> This is equivalent, except that:
> - security_inode_setattr() is not called before hpfs_notify_change()
> - fsnotify_change() is not called after hpfs_notify_change()
>
> The truncation is just an implementation detail, so both the security
> check and the notification are unnecessary.
>
> Possibly even the ctime modification is wrong?
>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
> CC: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
> ---
> fs/hpfs/namei.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/fs/hpfs/namei.c
> ===================================================================
> --- linux-2.6.orig/fs/hpfs/namei.c 2008-07-23 00:10:13.000000000 +0200
> +++ linux-2.6/fs/hpfs/namei.c 2008-07-23 00:10:22.000000000 +0200
> @@ -426,7 +426,8 @@ again:
> /*printk("HPFS: truncating file before delete.\n");*/
> newattrs.ia_size = 0;
> newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
> - err = notify_change(dentry, &newattrs);
> + newattrs.ia_ctime = current_fs_time(inode->i_sb);
> + err = hpfs_notify_change(dentry, &newattrs);
> put_write_access(inode);
> if (!err)
> goto again;
>
> --
>


\
 
 \ /
  Last update: 2008-07-23 14:43    [W:0.139 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site