mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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
This commit is contained in:
commit
11cc21f5f5
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user