[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061019032442.GA20695@localhost>
Date: Thu, 19 Oct 2006 12:24:42 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH] debugfs: check return value correctly
The return value is stored in "*dentry", not in "dentry".
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
Index: work-fault-inject/fs/debugfs/inode.c
===================================================================
--- work-fault-inject.orig/fs/debugfs/inode.c
+++ work-fault-inject/fs/debugfs/inode.c
@@ -147,13 +147,13 @@ static int debugfs_create_by_name(const
*dentry = NULL;
mutex_lock(&parent->d_inode->i_mutex);
*dentry = lookup_one_len(name, parent, strlen(name));
- if (!IS_ERR(dentry)) {
+ if (!IS_ERR(*dentry)) {
if ((mode & S_IFMT) == S_IFDIR)
error = debugfs_mkdir(parent->d_inode, *dentry, mode);
else
error = debugfs_create(parent->d_inode, *dentry, mode);
} else
- error = PTR_ERR(dentry);
+ error = PTR_ERR(*dentry);
mutex_unlock(&parent->d_inode->i_mutex);
return error;
-
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