freebsd-src/sys/ufs/ffs
Konstantin Belousov 5e198e7646 ffs_close_ea: do not relock vnode under lock_ea
ffs_lock_ea is after the vnode lock, so vnode must not be relocked under
lock_ea. Move ffs_truncate() call in ffs_close_ea() after the lock_ea is
dropped, and only truncate to length zero, since this is the only mode
supported by ffs_truncate() for EAs. Previously code did truncation and
then write.

Zero the part of the ext area that is unused, if truncation is due but not
done because ea area is not zero-length.

Reviewed by:	mckusick
Tested by:	pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
2021-02-24 09:55:04 +02:00
..
ffs_alloc.c
ffs_balloc.c ffs: do not call softdep_prealloc() from UFS_BALLOC() 2021-02-24 09:54:50 +02:00
ffs_extern.h
ffs_inode.c
ffs_rawread.c
ffs_snapshot.c
ffs_softdep.c
ffs_subr.c
ffs_suspend.c
ffs_tables.c
ffs_vfsops.c
ffs_vnops.c ffs_close_ea: do not relock vnode under lock_ea 2021-02-24 09:55:04 +02:00
fs.h
softdep.h