summaryrefslogtreecommitdiff
path: root/quotaio.c
diff options
context:
space:
mode:
Diffstat (limited to 'quotaio.c')
-rw-r--r--quotaio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quotaio.c b/quotaio.c
index 6c0f90e..bbcbf32 100644
--- a/quotaio.c
+++ b/quotaio.c
@@ -119,7 +119,7 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags)
qfname, strerror(errno));
goto out_handle;
}
- flock(fd, LOCK_EX);
+ flock(fd, QIO_RO(h) ? LOCK_SH : LOCK_EX);
/* Init handle */
h->qh_fd = fd;