summaryrefslogtreecommitdiff
path: root/quotaio_v2.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-05-02 10:02:20 +0000
committerjkar8572 <jkar8572>2001-05-02 10:02:20 +0000
commit79d6138d6e5764429d0a4e245f143ab62625ce3b (patch)
tree4f77433937ade0501e981183bdb7616e1018c40d /quotaio_v2.c
parent84ec12aa207cb8d5323b63847bfd8115881f2886 (diff)
downloadlinuxquota-79d6138d6e5764429d0a4e245f143ab62625ce3b.tar.gz
Added check when GETINFO doesn't succeed in RO mode.
Diffstat (limited to 'quotaio_v2.c')
-rw-r--r--quotaio_v2.c6
1 files changed, 5 insertions, 1 deletions
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;