mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
hpfs_setattr error case avoids unlock_kernel
This fixed a case that 'sparse' spotted where hpfs_setattr has an error return
that didn't go through it's path that unlocks.
This is against git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
version 6313e3c217
.
Build tested only, I don't have an hpfs file system to test.
Dave
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e0bb6bda43
commit
274052ef0b
@ -281,7 +281,7 @@ int hpfs_setattr(struct dentry *dentry, struct iattr *attr)
|
|||||||
attr->ia_size != i_size_read(inode)) {
|
attr->ia_size != i_size_read(inode)) {
|
||||||
error = vmtruncate(inode, attr->ia_size);
|
error = vmtruncate(inode, attr->ia_size);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
setattr_copy(inode, attr);
|
setattr_copy(inode, attr);
|
||||||
|
Loading…
Reference in New Issue
Block a user