summaryrefslogtreecommitdiff
path: root/rquota_client.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2007-08-23 19:58:14 +0000
committerjkar8572 <jkar8572>2007-08-23 19:58:14 +0000
commitb5f4715038ac5236a31e396208d33a5e600f9f4c (patch)
tree45bd7fca50d54646a91a3762c5f27a40c05d5d24 /rquota_client.c
parent690f9c08922da8d625732259c5db5f67a17ed4e0 (diff)
Added options to enable pathname mangling for NFSv4 (Jan Kara)
Diffstat (limited to 'rquota_client.c')
-rw-r--r--rquota_client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/rquota_client.c b/rquota_client.c
index f6926f2..883df40 100644
--- a/rquota_client.c
+++ b/rquota_client.c
@@ -9,7 +9,7 @@
*
* This part does the rpc-communication with the rquotad.
*
- * Version: $Id: rquota_client.c,v 1.10 2007/08/23 18:55:28 jkar8572 Exp $
+ * Version: $Id: rquota_client.c,v 1.11 2007/08/23 19:58:14 jkar8572 Exp $
*
* Author: Marco van Wieringen <mvw@planets.elm.net>
*
@@ -157,7 +157,8 @@ int rpc_rquota_get(struct dquot *dquot)
*pathname++ = '\0';
/* For NFSv4, we send the filesystem path without initial /. Server prepends proper
* NFS pseudoroot automatically and uses this for detection of NFSv4 mounts. */
- if (!strcmp(dquot->dq_h->qh_fstype, MNTTYPE_NFS4)) {
+ if ((dquot->dq_h->qh_io_flags & IOFL_NFS_MIXED_PATHS) &&
+ !strcmp(dquot->dq_h->qh_fstype, MNTTYPE_NFS4)) {
while (*pathname == '/')
pathname++;
}
@@ -273,7 +274,8 @@ int rpc_rquota_set(int qcmd, struct dquot *dquot)
*pathname++ = '\0';
/* For NFSv4, we send the filesystem path without initial /. Server prepends proper
* NFS pseudoroot automatically and uses this for detection of NFSv4 mounts. */
- if (!strcmp(dquot->dq_h->qh_fstype, MNTTYPE_NFS4)) {
+ if ((dquot->dq_h->qh_io_flags & IOFL_NFS_MIXED_PATHS) &&
+ !strcmp(dquot->dq_h->qh_fstype, MNTTYPE_NFS4)) {
while (*pathname == '/')
pathname++;
}