diff options
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 18aa9440df14..0efba557fb55 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1563,14 +1563,20 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, | |||
1563 | if (exp->ex_fslocs.migrated) { | 1563 | if (exp->ex_fslocs.migrated) { |
1564 | WRITE64(NFS4_REFERRAL_FSID_MAJOR); | 1564 | WRITE64(NFS4_REFERRAL_FSID_MAJOR); |
1565 | WRITE64(NFS4_REFERRAL_FSID_MINOR); | 1565 | WRITE64(NFS4_REFERRAL_FSID_MINOR); |
1566 | } else if (is_fsid(fhp, rqstp->rq_reffh)) { | 1566 | } else switch(fsid_source(fhp)) { |
1567 | case FSIDSOURCE_FSID: | ||
1567 | WRITE64((u64)exp->ex_fsid); | 1568 | WRITE64((u64)exp->ex_fsid); |
1568 | WRITE64((u64)0); | 1569 | WRITE64((u64)0); |
1569 | } else { | 1570 | break; |
1571 | case FSIDSOURCE_DEV: | ||
1570 | WRITE32(0); | 1572 | WRITE32(0); |
1571 | WRITE32(MAJOR(stat.dev)); | 1573 | WRITE32(MAJOR(stat.dev)); |
1572 | WRITE32(0); | 1574 | WRITE32(0); |
1573 | WRITE32(MINOR(stat.dev)); | 1575 | WRITE32(MINOR(stat.dev)); |
1576 | break; | ||
1577 | case FSIDSOURCE_UUID: | ||
1578 | WRITEMEM(exp->ex_uuid, 16); | ||
1579 | break; | ||
1574 | } | 1580 | } |
1575 | } | 1581 | } |
1576 | if (bmval0 & FATTR4_WORD0_UNIQUE_HANDLES) { | 1582 | if (bmval0 & FATTR4_WORD0_UNIQUE_HANDLES) { |