Page MenuHomeFreeBSD

D30218.id89043.diff
No OneTemporary

D30218.id89043.diff

Index: share/man/man9/VFS_QUOTACTL.9
===================================================================
--- share/man/man9/VFS_QUOTACTL.9
+++ share/man/man9/VFS_QUOTACTL.9
@@ -45,6 +45,19 @@
See
.Xr quotactl 2
for a description of the arguments.
+.Pp
+The VFS_QUOTACTL macro is called with
+.Fa mp
+busied through
+.Xr vfs_busy 9 .
+For the Q_QUOTAON and Q_QUOTAOFF commands, the filesystem-specific
+implementation of VFS_QUOTACTL must clear the busy state on
+.Fa mp
+by calling
+.Xr vfs_unbusy 9
+prior to performing any quota file access and must return with
+.Fa mp
+no longer busy.
.Sh SEE ALSO
.Xr quotactl 2 ,
.Xr vnode 9
Index: sys/kern/vfs_default.c
===================================================================
--- sys/kern/vfs_default.c
+++ sys/kern/vfs_default.c
@@ -63,6 +63,8 @@
#include <security/mac/mac_framework.h>
+#include <ufs/ufs/quota.h>
+
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
@@ -1328,6 +1330,12 @@
uid_t uid;
void *arg;
{
+ int cmd;
+
+ cmd = cmds >> SUBCMDSHIFT;
+
+ if (cmd == Q_QUOTAON || cmd == Q_QUOTAOFF)
+ vfs_unbusy(mp);
return (EOPNOTSUPP);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 14, 6:22 PM (38 m, 51 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31490548
Default Alt Text
D30218.id89043.diff (1 KB)

Event Timeline