summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-05-01 23:51:22 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2010-05-10 23:08:17 +0200
commit6a727b43be8b005609e893a80af980808012cfdb (patch)
tree7e30e015a9da93f049fbe6a27b591313d592b8b6 /include/linux/fs.h
parentbc6a0cbd576c66995d782331456f68ae63a50af4 (diff)
downloadlwn-6a727b43be8b005609e893a80af980808012cfdb.tar.gz
lwn-6a727b43be8b005609e893a80af980808012cfdb.zip
FS / libfs: Implement simple_write_to_buffer
It will be used in suspend code and serves as an easy wrap around copy_from_user. Similar to simple_read_from_buffer, it takes care of transfers with proper lengths depending on available and count parameters and advances ppos appropriately. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 44f35aea2f1f..948bd2bfb1de 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2362,6 +2362,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count);
extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
loff_t *ppos, const void *from, size_t available);
+extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
+ const void __user *from, size_t count);
extern int simple_fsync(struct file *, struct dentry *, int);