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
This commit is contained in:
Pawel Jakub Dawidek 2012-09-25 21:31:17 +00:00
parent cf8f32025f
commit 8c706ce0d0

View File

@ -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;