From 79d6138d6e5764429d0a4e245f143ab62625ce3b Mon Sep 17 00:00:00 2001 From: jkar8572 Date: Wed, 2 May 2001 10:02:20 +0000 Subject: Added check when GETINFO doesn't succeed in RO mode. --- quotaio_v2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'quotaio_v2.c') diff --git a/quotaio_v2.c b/quotaio_v2.c index f256b3c..b8c8f8f 100644 --- a/quotaio_v2.c +++ b/quotaio_v2.c @@ -139,8 +139,12 @@ static int v2_init_io(struct quota_handle *h) if (QIO_ENABLED(h)) { struct v2_kern_dqinfo kdqinfo; - if (quotactl(QCMD(Q_V2_GETINFO, h->qh_type), h->qh_quotadev, 0, (void *)&kdqinfo) < 0) + if (quotactl(QCMD(Q_V2_GETINFO, h->qh_type), h->qh_quotadev, 0, (void *)&kdqinfo) < 0) { + /* Temporary check just before fix gets to kernel */ + if (errno == EPERM) /* Don't have permission to get information? */ + return 0; return -1; + } h->qh_info.dqi_bgrace = kdqinfo.dqi_bgrace; h->qh_info.dqi_igrace = kdqinfo.dqi_igrace; h->qh_info.u.v2_mdqi.dqi_flags = kdqinfo.dqi_flags; -- cgit v1.2.3