aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index dc5e64893375..2b112d978e9f 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -705,7 +705,14 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry)
705 705
706 spin_lock(&fc->lock); 706 spin_lock(&fc->lock);
707 fi->attr_version = ++fc->attr_version; 707 fi->attr_version = ++fc->attr_version;
708 drop_nlink(inode); 708 /*
709 * If i_nlink == 0 then unlink doesn't make sense, yet this can
710 * happen if userspace filesystem is careless. It would be
711 * difficult to enforce correct nlink usage so just ignore this
712 * condition here
713 */
714 if (inode->i_nlink > 0)
715 drop_nlink(inode);
709 spin_unlock(&fc->lock); 716 spin_unlock(&fc->lock);
710 fuse_invalidate_attr(inode); 717 fuse_invalidate_attr(inode);
711 fuse_invalidate_attr(dir); 718 fuse_invalidate_attr(dir);