@@ -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
@@ -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.