diff options
author | pjd <pjd@FreeBSD.org> | 2012-09-25 21:31:17 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-09-25 21:31:17 +0000 |
commit | b79f4497f47c4bf0824bf360a49bc975c3ee62ba (patch) | |
tree | e2aaa7bd87f9204d5154450d143238c2b2eb270e /sys | |
parent | 25f7973cf8d04f031bc1025030e0a63812538472 (diff) | |
download | FreeBSD-src-b79f4497f47c4bf0824bf360a49bc975c3ee62ba.zip FreeBSD-src-b79f4497f47c4bf0824bf360a49bc975c3ee62ba.tar.gz |
vn_write() always expects FOF_OFFSET flag, which is asserted at the begining,
so there is no need to check for it.
Sponsored by: FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_vnops.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 0ad2db8..fec55f9 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -806,10 +806,9 @@ vn_write(fp, uio, active_cred, flags, td) goto unlock; advice = get_advice(fp, uio); - - if ((MNT_SHARED_WRITES(mp) || - ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) && - (flags & FOF_OFFSET) != 0) { + + if (MNT_SHARED_WRITES(mp) || + (mp == NULL && MNT_SHARED_WRITES(vp->v_mount))) { lock_flags = LK_SHARED; } else { lock_flags = LK_EXCLUSIVE; |