diff --git a/sys/kern/vfs_quota.c b/sys/kern/vfs_quota.c --- a/sys/kern/vfs_quota.c +++ b/sys/kern/vfs_quota.c @@ -432,6 +432,14 @@ } } +/* + * NOTE: quota limits enforced here are advisory under concurrency. + * The spinlock is released before the caller's VFS allocates blocks, + * so N concurrent writers may each pass the check and collectively + * exceed the limit by up to (N-1)*delta before vfs_stdaccount commits. + * Tight enforcement would require holding the lock across the + * allocation, which is not feasible from this call site. + */ int vq_write_ok(struct mount *mp, uid_t uid, gid_t gid, uint64_t delta) {