Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 16:32:05 +0000 (09:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 16:32:05 +0000 (09:32 -0700)
* '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

fs/hfsplus/dir.c
fs/hfsplus/ioctl.c

index e318bbc0daf6eb9ac4cd4dac18213cc7e7e89ea8..9d59c0571f5982f27e3d36d12ea6fae81f3b02c2 100644 (file)
@@ -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);
index 5b4667e08ef7789e49c274758a28d11ef86d5fde..40a85a3ded6efe6a0a17d08fe2b068ba6b4e369a 100644 (file)
@@ -92,7 +92,7 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
        mark_inode_dirty(inode);
 
 out_unlock_inode:
-       mutex_lock(&inode->i_mutex);
+       mutex_unlock(&inode->i_mutex);
 out_drop_write:
        mnt_drop_write(file->f_path.mnt);
 out: