[PATCH 08/10] VFS: tiny optimisation in open_other handling.

From: NeilBrown
Date: Sun Sep 05 2010 - 20:52:12 EST


If IS_ERR(ret), then ret != NULL, so if we are performing the second
test we don't need the first.

Signed-off-by: NeilBrown <neilb@xxxxxxx>
---
fs/open.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/open.c b/fs/open.c
index 89e4f34..b986ca1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -687,7 +687,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
if (!open && f->f_op && f->f_op->open_other) {
/* NULL means keep f, non-error non-null means replace */
ret = f->f_op->open_other(f);
- if (IS_ERR(ret) || ret != NULL)
+ if (ret)
goto cleanup_all;
} else {
if (!open && f->f_op)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/