]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge tag 'configfs-for-4.8' of git://git.infradead.org/users/hch/configfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Jul 2016 18:45:41 +0000 (11:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 29 Jul 2016 18:45:41 +0000 (11:45 -0700)
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

fs/configfs/file.c

index bbc1252a59f5f1431ee779e16780f19a5f47a5d8..c30cf49b69d2f3de59e61ef273478d797cccc1b7 100644 (file)
@@ -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;
 }