summaryrefslogtreecommitdiff
path: root/quotaio.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-09-26 12:26:11 +0000
committerjkar8572 <jkar8572>2001-09-26 12:26:11 +0000
commit570ff1d772f4b2d0a73025c547e46e82ceb79eaa (patch)
tree56f536fb06c9557096635c05e00dfc8d9649ead1 /quotaio.c
parent48448ca24e00e530e59d774bfdb3c2a76616330c (diff)
Fixed detection of RH 7.1 kernel not to make problems on older kernels.
Utilities now use shared locks when opening files read-only. Changed naming of Q_GETSTATS as they would be no longer in kernel.
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;