Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6aa054aadfea613a437ad0b15d38eca2b963fc0a Commit: 6aa054aadfea613a437ad0b15d38eca2b963fc0a Parent: dc351252b33f8fede396d6173dba117bcb933607 Author: Tejun Heo <[EMAIL PROTECTED]> AuthorDate: Mon Jun 11 14:03:27 2007 +0900 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Tue Jun 12 16:08:46 2007 -0700
sysfs: fix condition check in sysfs_drop_dentry() The condition check doesn't make much sense as it basically always succeeds. This causes NULL dereferencing on certain cases. It seems that parentheses are put in the wrong place. Fix it. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- fs/sysfs/inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 082e2d4..38bbe07 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -252,7 +252,7 @@ void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) if (dentry) { spin_lock(&dcache_lock); spin_lock(&dentry->d_lock); - if (!(d_unhashed(dentry) && dentry->d_inode)) { + if (!d_unhashed(dentry) && dentry->d_inode) { inode = dentry->d_inode; spin_lock(&inode->i_lock); __iget(inode); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html