diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-05 03:54:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-05 03:54:08 -0700 |
commit | a276960837a7c87da6c0dede23f923675e5686f0 (patch) | |
tree | 150acd597823b332eda7bda30ef649c99c2da5d3 /fs | |
parent | 6909f28b899ae976c9f8f6666b21cc1a7eb3e680 (diff) | |
parent | a731692ee1cf9b59c789b165c2bbdd2b0c69b70b (diff) | |
download | history-a276960837a7c87da6c0dede23f923675e5686f0.tar.gz |
Merge bk://linux-mtd.bkbits.net/mtd-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'fs')
-rw-r--r-- | fs/libfs.c | 18 | ||||
-rw-r--r-- | fs/proc/array.c | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index dfe6ac5ac928bc..321ff8d38398d8 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -7,6 +7,7 @@ #include <linux/pagemap.h> #include <linux/mount.h> #include <linux/vfs.h> +#include <asm/uaccess.h> int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) @@ -439,6 +440,22 @@ void simple_release_fs(struct vfsmount **mount, int *count) mntput(mnt); } +ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos, + void *from, size_t available) +{ + loff_t pos = *ppos; + if (pos < 0) + return -EINVAL; + if (pos >= available) + return 0; + if (count > available - pos) + count = available - pos; + if (copy_to_user(to, from + pos, count)) + return -EFAULT; + *ppos = pos + count; + return count; +} + EXPORT_SYMBOL(dcache_dir_close); EXPORT_SYMBOL(dcache_dir_lseek); EXPORT_SYMBOL(dcache_dir_open); @@ -461,3 +478,4 @@ EXPORT_SYMBOL(simple_rmdir); EXPORT_SYMBOL(simple_statfs); EXPORT_SYMBOL(simple_sync_file); EXPORT_SYMBOL(simple_unlink); +EXPORT_SYMBOL(simple_read_from_buffer); diff --git a/fs/proc/array.c b/fs/proc/array.c index fbcf8bea0278d5..fe14439309ab3b 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -137,6 +137,7 @@ static inline const char * get_task_state(struct task_struct *tsk) TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE | TASK_ZOMBIE | + TASK_DEAD | TASK_STOPPED); const char **p = &task_state_array[0]; |