Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103354554
D18785.id52674.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18785.id52674.diff
View Options
Index: lib/libutil/quotafile.c
===================================================================
--- lib/libutil/quotafile.c
+++ lib/libutil/quotafile.c
@@ -119,6 +119,7 @@
struct group *grp;
struct stat st;
int qcmd, serrno;
+ int ufs;
if ((qf = calloc(1, sizeof(*qf))) == NULL)
return (NULL);
@@ -129,15 +130,21 @@
goto error;
qf->dev = st.st_dev;
qcmd = QCMD(Q_GETQUOTASIZE, quotatype);
+ ufs = strcmp(fs->fs_vfstype, "ufs") == 0;
+ /*
+ * On UFS, hasquota() fills in qf->qfname. But we only care about
+ * this for UFS. So we need to call hasquota() for UFS, first.
+ */
+ if (ufs) {
+ serrno = hasquota(fs, quotatype, qf->qfname,
+ sizeof(qf->qfname));
+ }
if (quotactl(qf->fsname, qcmd, 0, &qf->wordsize) == 0)
return (qf);
- /* We only check the quota file for ufs */
- if (strcmp(fs->fs_vfstype, "ufs")) {
+ if (!ufs) {
errno = 0;
goto error;
- }
- serrno = hasquota(fs, quotatype, qf->qfname, sizeof(qf->qfname));
- if (serrno == 0) {
+ } else if (serrno == 0) {
errno = EOPNOTSUPP;
goto error;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 11:17 PM (7 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14830076
Default Alt Text
D18785.id52674.diff (1 KB)
Attached To
Mode
D18785: Fix quotas for UFS after r339008
Attached
Detach File
Event Timeline
Log In to Comment