Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177477402
D18785.1794520005.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D18785.1794520005.diff
View Options
Index: head/lib/libutil/quotafile.c
===================================================================
--- head/lib/libutil/quotafile.c
+++ head/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
Thu, Nov 12, 9:46 PM (8 m, 44 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41684693
Default Alt Text
D18785.1794520005.diff (1 KB)
Attached To
Mode
D18785: Fix quotas for UFS after r339008
Attached
Detach File
Event Timeline