summary refs log tree commit diff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 11:45:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 11:45:41 -0700
commita54809f1167243d909b2c63fcd51e1d648deeb01 (patch)
tree7e5e31a929454035aa50031175dabd582a7ae7b5 /fs
parentb0c4e2acdd6175a07107474f3cd7bdc062cf4d3d (diff)
parent3dc3afadeb0403fd967b97ee282ab9053d36da2b (diff)
downloadlinux-a54809f1167243d909b2c63fcd51e1d648deeb01.tar.gz
Merge tag 'configfs-for-4.8' of git://git.infradead.org/users/hch/configfs
Pull configfs update from Christoph Hellwig:
 "A simple error handling fix from Tal Shorer"

* tag 'configfs-for-4.8' of git://git.infradead.org/users/hch/configfs:
  configfs: don't set buffer_needs_fill to zero if show() returns error
Diffstat (limited to 'fs')
-rw-r--r--fs/configfs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/configfs/file.c b/fs/configfs/file.c
index bbc1252a59f5..c30cf49b69d2 100644
--- a/fs/configfs/file.c
+++ b/fs/configfs/file.c
@@ -80,11 +80,11 @@ static int fill_read_buffer(struct dentry * dentry, struct configfs_buffer * buf
 
 	count = attr->show(item, buffer->page);
 
-	buffer->needs_read_fill = 0;
 	BUG_ON(count > (ssize_t)SIMPLE_ATTR_SIZE);
-	if (count >= 0)
+	if (count >= 0) {
+		buffer->needs_read_fill = 0;
 		buffer->count = count;
-	else
+	} else
 		ret = count;
 	return ret;
 }