aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-11 01:03:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-06-12 19:08:46 -0400
commit6aa054aadfea613a437ad0b15d38eca2b963fc0a (patch)
treee7fd512672b8f85fe2463ba4ba98bca06ffe6bb1 /fs/sysfs/inode.c
parentdc351252b33f8fede396d6173dba117bcb933607 (diff)
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 <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 082e2d430e93..38bbe071cc15 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)
252 if (dentry) { 252 if (dentry) {
253 spin_lock(&dcache_lock); 253 spin_lock(&dcache_lock);
254 spin_lock(&dentry->d_lock); 254 spin_lock(&dentry->d_lock);
255 if (!(d_unhashed(dentry) && dentry->d_inode)) { 255 if (!d_unhashed(dentry) && dentry->d_inode) {
256 inode = dentry->d_inode; 256 inode = dentry->d_inode;
257 spin_lock(&inode->i_lock); 257 spin_lock(&inode->i_lock);
258 __iget(inode); 258 __iget(inode);