Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing
authorKonstantin Belousov <kib@FreeBSD.org>
Sun, 21 Feb 2021 10:11:54 +0000 (12:11 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Wed, 24 Feb 2021 07:55:21 +0000 (09:55 +0200)
commit6f30ac9995ff662a2fee5eda4cd87dd0f0e337ba
treec3e57e4d48f9e28f264bef06a4ef219237cba7db
parent5e198e7646a27412c0541719f7bf1bbc0bd89223
Call softdep_prealloc() before taking ffs_lock_ea(), if unlock is committing

softdep_prealloc() must be called to ensure enough journal space is
available, before ffs_extwrite(). Also it must be done before taking
ffs_lock_ea(), because it calls ffs_syncvnode(), potentially dropping
the vnode lock.

Reviewed by: mckusick
Tested by: pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
sys/ufs/ffs/ffs_vnops.c