summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorManeesh Soni <maneesh@in.ibm.com>2005-05-31 10:39:14 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 15:15:37 -0700
commit988d186de5b6966a71a8cc52e6cb4895fd2f7799 (patch)
tree428cb6c29cbe2563eb91f9f2a03512b7eafa9449 /fs/sysfs/sysfs.h
parent6fa5c828c7fb6beef7035864bd2b18e7386fbdd5 (diff)
downloadblackbird-op-linux-988d186de5b6966a71a8cc52e6cb4895fd2f7799.tar.gz
blackbird-op-linux-988d186de5b6966a71a8cc52e6cb4895fd2f7799.zip
[PATCH] sysfs-iattr: add sysfs_setattr
o This adds ->i_op->setattr VFS method for sysfs inodes. The changed attribues are saved in the persistent sysfs_dirent structure as a pointer to struct iattr. The struct iattr is allocated only for those sysfs_dirent's for which default attributes are getting changed. Thanks to Jon Smirl for this suggestion. Signed-off-by: Maneesh Soni <maneesh@in.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index a8a24a0c0b3b..e8e9f0c2573e 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -17,6 +17,7 @@ extern void sysfs_remove_subdir(struct dentry *);
extern const unsigned char * sysfs_get_name(struct sysfs_dirent *sd);
extern void sysfs_drop_dentry(struct sysfs_dirent *sd, struct dentry *parent);
+extern int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);
extern struct rw_semaphore sysfs_rename_sem;
extern struct super_block * sysfs_sb;
@@ -75,6 +76,7 @@ static inline void release_sysfs_dirent(struct sysfs_dirent * sd)
kobject_put(sl->target_kobj);
kfree(sl);
}
+ kfree(sd->s_iattr);
kmem_cache_free(sysfs_dir_cachep, sd);
}
OpenPOWER on IntegriCloud