diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-07 09:43:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-07 09:43:47 -0700 |
commit | f7a4bc7ee10c8e39e80b3e84f227a5752b0092d9 (patch) | |
tree | d0ee302ad03fd56ef4df6af5dfee6e77c28932ea /fs | |
parent | 24e259799962e03efe3d1470346537ab1ce1b078 (diff) | |
download | history-f7a4bc7ee10c8e39e80b3e84f227a5752b0092d9.tar.gz |
Make sysctl pass the pos pointer around properly.
Nobody ever fixed the big FIXME in sysctl - but we really need
to pass around the proper "loff_t *" to all the sysctl functions
if we want them to be well-behaved wrt the file pointer position.
This is all preparation for making direct f_pos accesses go
away.
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coda/sysctl.c | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sysctl.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 60fc6f9ce2404c..fd98626ba280cb 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -69,12 +69,12 @@ void reset_coda_cache_inv_stats( void ) } int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp, - void __user * buffer, size_t * lenp ) + void __user * buffer, size_t * lenp, loff_t * ppos ) { if ( write ) { reset_coda_vfs_stats(); - filp->f_pos += *lenp; + *ppos += *lenp; } else { *lenp = 0; } @@ -84,12 +84,12 @@ int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp, int do_reset_coda_cache_inv_stats( ctl_table * table, int write, struct file * filp, void __user * buffer, - size_t * lenp ) + size_t * lenp, loff_t * ppos ) { if ( write ) { reset_coda_cache_inv_stats(); - filp->f_pos += *lenp; + *ppos += *lenp; } else { *lenp = 0; } diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 570d1a942507ad..4a173d3d8916bd 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -46,12 +46,13 @@ xfs_stats_clear_proc_handler( int write, struct file *filp, void *buffer, - size_t *lenp) + size_t *lenp, + loff_t *ppos) { int c, ret, *valp = ctl->data; __uint32_t vn_active; - ret = proc_dointvec_minmax(ctl, write, filp, buffer, lenp); + ret = proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); if (!ret && write && *valp) { printk("XFS Clearing xfsstats\n"); |