Commit a8e147da authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

staging: lustre: lvfs: expand the GOTO macro

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
identifier rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fc5c7f3d
...@@ -215,12 +215,16 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt, ...@@ -215,12 +215,16 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt,
if (IS_ERR(dchild_old)) if (IS_ERR(dchild_old))
return PTR_ERR(dchild_old); return PTR_ERR(dchild_old);
if (!dchild_old->d_inode) if (!dchild_old->d_inode) {
GOTO(put_old, err = -ENOENT); err = -ENOENT;
goto put_old;
}
dchild_new = ll_lookup_one_len(newname, dir, strlen(newname)); dchild_new = ll_lookup_one_len(newname, dir, strlen(newname));
if (IS_ERR(dchild_new)) if (IS_ERR(dchild_new)) {
GOTO(put_old, err = PTR_ERR(dchild_new)); err = PTR_ERR(dchild_new);
goto put_old;
}
err = ll_vfs_rename(dir->d_inode, dchild_old, mnt, err = ll_vfs_rename(dir->d_inode, dchild_old, mnt,
dir->d_inode, dchild_new, mnt); dir->d_inode, dchild_new, mnt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment