aboutsummaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-08-04 15:56:15 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2005-08-04 15:56:15 -0500
commita5c96cab8f3c4ca9b2177dceb5de5a0edb31418e (patch)
tree45692a1b3d770f721f4586ad81c206f1b8509b75 /fs/namei.c
parent30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd (diff)
parent1c5ad84516ae7ea4ec868436a910a6bd8d20215a (diff)
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 02a824cd3c5..83559dce428 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1801,8 +1801,8 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
}
up(&dentry->d_inode->i_sem);
if (!error) {
- fsnotify_rmdir(dentry, dentry->d_inode, dir);
d_delete(dentry);
+ fsnotify_rmdir(dentry, dentry->d_inode, dir);
}
dput(dentry);
@@ -1874,8 +1874,14 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
/* We don't d_delete() NFS sillyrenamed files--they still exist. */
if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
+#if defined(CONFIG_INOTIFY) || defined(CONFIG_DNOTIFY)
+ dget(dentry);
+ d_delete(dentry);
fsnotify_unlink(dentry, dir);
+ dput(dentry);
+#else
d_delete(dentry);
+#endif
}
return error;
@@ -2218,7 +2224,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry);
if (!error) {
const char *new_name = old_dentry->d_name.name;
- fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir);
+ fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode);
}
fsnotify_oldname_free(old_name);