mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
ubifs: Call iput(xino) only once in ubifs_purge_xattrs()
An iput(xino) call was immediately used after a return value check for a remove_xattr() call in this function implementation. Thus call such a function only once instead directly before the check. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
5580cdae05
commit
c6fa76da34
|
|
@ -541,16 +541,14 @@ int ubifs_purge_xattrs(struct inode *host)
|
|||
|
||||
clear_nlink(xino);
|
||||
err = remove_xattr(c, host, xino, &nm);
|
||||
iput(xino);
|
||||
if (err) {
|
||||
kfree(pxent);
|
||||
kfree(xent);
|
||||
iput(xino);
|
||||
ubifs_err(c, "cannot remove xattr, error %d", err);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
iput(xino);
|
||||
|
||||
kfree(pxent);
|
||||
pxent = xent;
|
||||
key_read(c, &xent->key, &key);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user