Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7a23ad44047b1084a032bc0d127fe08af024593a
Commit:     7a23ad44047b1084a032bc0d127fe08af024593a
Parent:     2b611bb7abdcc08278453fc9f6517401fd69ef95
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 14 03:45:13 2007 +0900
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 16:09:03 2007 -0700

    sysfs: make sysfs_put() ignore NULL sd
    
    Make sysfs_put() ignore NULL sd instead of oopsing.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 fs/sysfs/sysfs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 687d959..f4fdbbf 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -111,7 +111,7 @@ static inline struct sysfs_dirent * sysfs_get(struct 
sysfs_dirent * sd)
 
 static inline void sysfs_put(struct sysfs_dirent * sd)
 {
-       if (atomic_dec_and_test(&sd->s_count))
+       if (sd && atomic_dec_and_test(&sd->s_count))
                release_sysfs_dirent(sd);
 }
 
-
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

Reply via email to