diff options
author | Ricardo Correia <[email protected]> | 2010-04-23 12:19:10 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-04-23 14:39:42 -0700 |
commit | 663e02a135953a432c8497916657a29cbcd93c01 (patch) | |
tree | 94f4d14073182cb805e480c9555a05cc8adefa7b /module/spl | |
parent | 82a358d9c0750a84232adf5c092aeec339c9dd3a (diff) |
Handle the FAPPEND option in vn_rdwr().
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/spl')
-rw-r--r-- | module/spl/spl-vnode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 77652a5a2..a113ecb2f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -181,7 +181,7 @@ EXPORT_SYMBOL(vn_openat); int vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, - uio_seg_t seg, int x1, rlim64_t x2, void *x3, ssize_t *residp) + uio_seg_t seg, int ioflag, rlim64_t x2, void *x3, ssize_t *residp) { loff_t offset; mm_segment_t saved_fs; @@ -193,12 +193,15 @@ vn_rdwr(uio_rw_t uio, vnode_t *vp, void *addr, ssize_t len, offset_t off, ASSERT(vp); ASSERT(vp->v_file); ASSERT(seg == UIO_SYSSPACE); - ASSERT(x1 == 0); + ASSERT((ioflag & ~FAPPEND) == 0); ASSERT(x2 == RLIM64_INFINITY); - offset = off; fp = vp->v_file; + offset = off; + if (ioflag & FAPPEND) + offset = fp->f_pos; + /* Writable user data segment must be briefly increased for this * process so we can use the user space read call paths to write * in to memory allocated by the kernel. */ |