]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sysfs/sysfs.h
sysfs: Support sysfs_notify from atomic context with new sysfs_notify_dirent
[linux-2.6-omap-h63xx.git] / fs / sysfs / sysfs.h
index a5db496f71c717ce63073440a3c9a23138b67d47..93c6d6b27c4ded5596c783ac1bdbe4e4b2590bbd 100644 (file)
@@ -124,7 +124,7 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name,
                        struct sysfs_dirent **p_sd);
 void sysfs_remove_subdir(struct sysfs_dirent *sd);
 
-static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
+static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd)
 {
        if (sd) {
                WARN_ON(!atomic_read(&sd->s_count));
@@ -132,12 +132,14 @@ static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
        }
        return sd;
 }
+#define sysfs_get(sd) __sysfs_get(sd)
 
-static inline void sysfs_put(struct sysfs_dirent *sd)
+static inline void __sysfs_put(struct sysfs_dirent *sd)
 {
        if (sd && atomic_dec_and_test(&sd->s_count))
                release_sysfs_dirent(sd);
 }
+#define sysfs_put(sd) __sysfs_put(sd)
 
 /*
  * inode.c