configfs: add show and store methods to struct configfs_attribute
authorChristoph Hellwig <hch@lst.de>
Sat, 3 Oct 2015 13:32:37 +0000 (15:32 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 14 Oct 2015 05:08:43 +0000 (22:08 -0700)
commit870823e629ea194e6cf8e82a9694ac62cad49512
treeb48ab62284a125096e42d6628850c7a8e4629aa7
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
configfs: add show and store methods to struct configfs_attribute

Add methods to struct configfs_attribute to directly show and store
attributes without adding boilerplate code to every user.  In addition
to the methods this also adds 3 helper macros to define read/write,
read-only and write-only attributes with a single line of code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
fs/configfs/file.c
include/linux/configfs.h