summaryrefslogtreecommitdiffstats
path: root/fs/configfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-10-03 15:32:59 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-10-13 22:17:57 -0700
commit517982229f78b2aebf00a8a337e84e8eeea70b8e (patch)
tree6f5f093837a26d5b56874689234dc818951779ac /fs/configfs
parent45b997737a8025be2825e464e9e9dd5d07160dc3 (diff)
downloadlinux-517982229f78b2aebf00a8a337e84e8eeea70b8e.tar.bz2
configfs: remove old API
Remove the old show_attribute and store_attribute methods and update the documentation. Also replace the two C samples with a single new one in the proper samples directory where people expect to find it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'fs/configfs')
-rw-r--r--fs/configfs/file.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/configfs/file.c b/fs/configfs/file.c
index 106ca589e90a..d39099ea7df7 100644
--- a/fs/configfs/file.c
+++ b/fs/configfs/file.c
@@ -65,7 +65,6 @@ static int fill_read_buffer(struct dentry * dentry, struct configfs_buffer * buf
{
struct configfs_attribute * attr = to_attr(dentry);
struct config_item * item = to_item(dentry->d_parent);
- struct configfs_item_operations * ops = buffer->ops;
int ret = 0;
ssize_t count;
@@ -74,10 +73,7 @@ static int fill_read_buffer(struct dentry * dentry, struct configfs_buffer * buf
if (!buffer->page)
return -ENOMEM;
- if (ops->show_attribute)
- count = ops->show_attribute(item, attr, buffer->page);
- else
- count = attr->show(item, buffer->page);
+ count = attr->show(item, buffer->page);
buffer->needs_read_fill = 0;
BUG_ON(count > (ssize_t)SIMPLE_ATTR_SIZE);
@@ -175,10 +171,7 @@ flush_write_buffer(struct dentry * dentry, struct configfs_buffer * buffer, size
{
struct configfs_attribute * attr = to_attr(dentry);
struct config_item * item = to_item(dentry->d_parent);
- struct configfs_item_operations * ops = buffer->ops;
- if (ops->store_attribute)
- return ops->store_attribute(item, attr, buffer->page, count);
return attr->store(item, buffer->page, count);
}
@@ -243,8 +236,7 @@ static int check_perm(struct inode * inode, struct file * file)
* and we must have a store method.
*/
if (file->f_mode & FMODE_WRITE) {
- if (!(inode->i_mode & S_IWUGO) ||
- (!ops->store_attribute && !attr->store))
+ if (!(inode->i_mode & S_IWUGO) || !attr->store)
goto Eaccess;
}
@@ -254,8 +246,7 @@ static int check_perm(struct inode * inode, struct file * file)
* must be a show method for it.
*/
if (file->f_mode & FMODE_READ) {
- if (!(inode->i_mode & S_IRUGO) ||
- (!ops->show_attribute && !attr->show))
+ if (!(inode->i_mode & S_IRUGO) || !attr->show)
goto Eaccess;
}