aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namei.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 4a27eb798118..83559dce4286 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1801,8 +1801,8 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
1801 } 1801 }
1802 up(&dentry->d_inode->i_sem); 1802 up(&dentry->d_inode->i_sem);
1803 if (!error) { 1803 if (!error) {
1804 fsnotify_rmdir(dentry, dentry->d_inode, dir);
1805 d_delete(dentry); 1804 d_delete(dentry);
1805 fsnotify_rmdir(dentry, dentry->d_inode, dir);
1806 } 1806 }
1807 dput(dentry); 1807 dput(dentry);
1808 1808
@@ -1874,8 +1874,14 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
1874 1874
1875 /* We don't d_delete() NFS sillyrenamed files--they still exist. */ 1875 /* We don't d_delete() NFS sillyrenamed files--they still exist. */
1876 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) { 1876 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
1877#if defined(CONFIG_INOTIFY) || defined(CONFIG_DNOTIFY)
1878 dget(dentry);
1879 d_delete(dentry);
1877 fsnotify_unlink(dentry, dir); 1880 fsnotify_unlink(dentry, dir);
1881 dput(dentry);
1882#else
1878 d_delete(dentry); 1883 d_delete(dentry);
1884#endif
1879 } 1885 }
1880 1886
1881 return error; 1887 return error;