summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/dir.c
diff options
context:
space:
mode:
authorLinus Torvalds2010-10-28 18:32:05 +0200
committerLinus Torvalds2010-10-28 18:32:05 +0200
commit11cc21f5f5575b9abd14d53a6055ccbf72b67573 (patch)
treed9a93174b25021748f11e4e797267f381bf4485b /fs/hfsplus/dir.c
parentext4: fix compile with CONFIG_EXT4_FS_XATTR disabled (diff)
parenthfsplus: free space correcly for files unlinked while open (diff)
downloadkernel-qcow2-linux-11cc21f5f5575b9abd14d53a6055ccbf72b67573.tar.gz
kernel-qcow2-linux-11cc21f5f5575b9abd14d53a6055ccbf72b67573.tar.xz
kernel-qcow2-linux-11cc21f5f5575b9abd14d53a6055ccbf72b67573.zip
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus: hfsplus: free space correcly for files unlinked while open hfsplus: fix double lock typo in ioctl
Diffstat (limited to 'fs/hfsplus/dir.c')
-rw-r--r--fs/hfsplus/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
index e318bbc0daf6..9d59c0571f59 100644
--- a/fs/hfsplus/dir.c
+++ b/fs/hfsplus/dir.c
@@ -317,8 +317,10 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
res = hfsplus_rename_cat(inode->i_ino,
dir, &dentry->d_name,
sbi->hidden_dir, &str);
- if (!res)
+ if (!res) {
inode->i_flags |= S_DEAD;
+ drop_nlink(inode);
+ }
goto out;
}
res = hfsplus_delete_cat(cnid, dir, &dentry->d_name);