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-05-06 11:04:29.000000000 +0200
+++ linux-2.6/fs/hpfs/namei.c 2008-05-06 11:04:34.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;
--
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Tony Lindgren | [PATCH 37/90] ARM: OMAP: MPUIO wake updates |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Miklos Szeredi | -rt doesn't compile for UML |
git: | |
| Florian Weimer | Re: Handling large files with GIT |
| Dana How | [PATCH] Prevent megablobs from gunking up git packs |
| Denis Bueno | Recovering from repository corruption |
| Peter Stahlir | Git as a filesystem |
| Richard Stallman | Real men don't attack straw men |
| Brian A. Seklecki | sshd_config(5) PermitRootLogin yes |
| Theo de Raadt | Re: dmesg IBM x3650 OpenBSD 4.3 |
| Stuart Henderson | Re: Actual BIND error - Patching OpenBSD 4.3 named ? |
| Auke Kok | [PATCH 5/6] e1000: Secondary unicast address support |
| Jon Nelson | tg3: strange errors and non-working-ness |
| Indan Zupancic | Re: Realtek 8111C transmit timed out |
| Brandeburg, Jesse | RE: 2.6.24 BUG: soft lockup - CPU#X |
| Shared swap partition | 10 minutes ago | Linux general |
| usb mic not detected | 4 hours ago | Applications and Utilities |
| Problem in Inserting a module | 5 hours ago | Linux kernel |
| Treason Uncloaked | 10 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
| Root password | 3 days ago | Linux general |
| Where/when DNOTIFY is used? | 3 days ago | Linux kernel |
