From 570ff1d772f4b2d0a73025c547e46e82ceb79eaa Mon Sep 17 00:00:00 2001 From: jkar8572 Date: Wed, 26 Sep 2001 12:26:11 +0000 Subject: 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. --- quotaio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quotaio.c') 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; -- cgit v1.2.3