[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11777675802688-git-send-email-htejun@gmail.com>
Date: Sat, 28 Apr 2007 22:39:40 +0900
From: Tejun Heo <htejun@...il.com>
To: gregkh@...e.de, dmitry.torokhov@...il.com,
cornelia.huck@...ibm.com, oneukum@...e.de, rpurdie@...ys.net,
stern@...land.harvard.edu, maneesh@...ibm.com,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
htejun@...il.com
Cc: Tejun Heo <htejun@...il.com>
Subject: [PATCH 06/21] sysfs: make sysfs_put() ignore NULL sd
Make sysfs_put() ignore NULL sd instead of oopsing.
Signed-off-by: Tejun Heo <htejun@...il.com>
---
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 1d61027..a3ca6d6 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -110,7 +110,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);
}
--
1.5.0.3
-
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