[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1410106715-9573-4-git-send-email-Julia.Lawall@lip6.fr>
Date: Sun, 7 Sep 2014 18:18:32 +0200
From: Julia Lawall <Julia.Lawall@...6.fr>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kernel-janitors@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org,
"Dilger, Andreas" <andreas.dilger@...el.com>,
"Drokin, Oleg" <oleg.drokin@...el.com>,
Peng Tao <bergwolf@...il.com>
Subject: [PATCH 4/7] staging: lustre: lvfs: expand the GOTO macro
From: Julia Lawall <Julia.Lawall@...6.fr>
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: Julia Lawall <Julia.Lawall@...6.fr>
---
drivers/staging/lustre/lustre/lvfs/lvfs_linux.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
index eea0b2c..d9209b9 100644
--- a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
+++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c
@@ -215,12 +215,16 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt,
if (IS_ERR(dchild_old))
return PTR_ERR(dchild_old);
- if (!dchild_old->d_inode)
- GOTO(put_old, err = -ENOENT);
+ if (!dchild_old->d_inode) {
+ err = -ENOENT;
+ goto put_old;
+ }
dchild_new = ll_lookup_one_len(newname, dir, strlen(newname));
- if (IS_ERR(dchild_new))
- GOTO(put_old, err = PTR_ERR(dchild_new));
+ if (IS_ERR(dchild_new)) {
+ err = PTR_ERR(dchild_new);
+ goto put_old;
+ }
err = ll_vfs_rename(dir->d_inode, dchild_old, mnt,
dir->d_inode, dchild_new, mnt);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists