diff options
author | Christoph Hellwig <hch@lst.de> | 2008-02-08 04:20:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 09:22:34 -0800 |
commit | 8b88b0998e35d239e74446cc30f354bdab86df89 (patch) | |
tree | c13773b744cf12b1e30ec9336a4acaf21e46c6d9 /include | |
parent | efae09f3e99fcc1bdead7bc23a508b3bade3f82f (diff) | |
download | linux-3.10-8b88b0998e35d239e74446cc30f354bdab86df89.tar.gz linux-3.10-8b88b0998e35d239e74446cc30f354bdab86df89.tar.bz2 linux-3.10-8b88b0998e35d239e74446cc30f354bdab86df89.zip |
libfs: allow error return from simple attributes
Sometimes simple attributes might need to return an error, e.g. for
acquiring a mutex interruptibly. In fact we have that situation in
spufs already which is the original user of the simple attributes. This
patch merged the temporarily forked attributes in spufs back into the
main ones and allows to return errors.
[akpm@linux-foundation.org: build fix]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: <stefano.brivio@polimi.it>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg KH <greg@kroah.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 36b7abefacb..ebe996ac258 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2068,7 +2068,7 @@ __simple_attr_check_format(const char *fmt, ...) } int simple_attr_open(struct inode *inode, struct file *file, - u64 (*get)(void *), void (*set)(void *, u64), + int (*get)(void *, u64 *), int (*set)(void *, u64), const char *fmt); int simple_attr_close(struct inode *inode, struct file *file); ssize_t simple_attr_read(struct file *file, char __user *buf, |