This reverts commit e31921a7fa0a13119e359b8ec200fb4047c0527f. --- fs/nfsd/nfs4xdr.c | 37 +++++++++++++------------------------ include/linux/nfsd/nfsd4_pnfs.h | 10 ---------- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 596a2a5..b157eae 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3766,8 +3766,15 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, nfserr = sb->s_pnfs_op->get_device_info(sb, &xdr, gdev->gd_layout_type, &gdev->gd_devid); - if (nfserr) - goto err; + if (nfserr) { + /* Rewind to the beginning */ + p = p_in; + ADJUST_ARGS(); + if (nfserr == -ETOOSMALL) + goto toosmall; + printk(KERN_ERR "%s: export ERROR %d\n", __func__, nfserr); + goto out; + } /* The file system should never write 0 bytes without * returning an error @@ -3782,21 +3789,11 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, ADJUST_ARGS(); handle_notifications: - /* Encode supported device notifications */ + /* Encode supported device notifications. + * Note: Currently none are supported. + */ RESERVE_SPACE(4); - if (sb->s_pnfs_op->set_device_notify) { - struct pnfs_devnotify_arg dn_args; - - dn_args.dn_layout_type = gdev->gd_layout_type; - dn_args.dn_devid = gdev->gd_devid; - dn_args.dn_notify_types = gdev->gd_notify_types; - nfserr = sb->s_pnfs_op->set_device_notify(sb, &dn_args); - if (nfserr) - goto err; - WRITE32(dn_args.dn_notify_types); - } else { - WRITE32(0); - } + WRITE32(0); ADJUST_ARGS(); out: @@ -3807,14 +3804,6 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, WRITE32((p_save ? (xdr.p - p_save) * 4 : 0) + type_notify_len); ADJUST_ARGS(); goto out; -err: - /* Rewind to the beginning */ - p = p_in; - ADJUST_ARGS(); - if (nfserr == -ETOOSMALL) - goto toosmall; - printk(KERN_ERR "%s: export ERROR %d\n", __func__, nfserr); - goto out; } static __be32 diff --git a/include/linux/nfsd/nfsd4_pnfs.h b/include/linux/nfsd/nfsd4_pnfs.h index d86e1b7..a49d5f6 100644 --- a/include/linux/nfsd/nfsd4_pnfs.h +++ b/include/linux/nfsd/nfsd4_pnfs.h @@ -58,13 +58,6 @@ struct nfsd4_pnfs_dev_iter_res { u32 gd_eof; /* response */ }; -/* Arguments for set_device_notify */ -struct pnfs_devnotify_arg { - struct nfsd4_pnfs_deviceid dn_devid; /* request */ - u32 dn_layout_type; /* request */ - u32 dn_notify_types; /* request/response */ -}; - struct nfsd4_layout_seg { u64 clientid; u32 layout_type; @@ -160,9 +153,6 @@ struct pnfs_export_operations { u32 layout_type, struct nfsd4_pnfs_dev_iter_res *); - int (*set_device_notify) (struct super_block *, - struct pnfs_devnotify_arg *); - /* Retrieve and encode a layout for inode onto the xdr stream. * arg->minlength is the minimum number of accessible bytes required * by the client. -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html