@@ -56,6 +56,7 @@ enum pnfs_try_status {
struct pnfs_fsdata {
struct pnfs_layout_segment *lseg;
+ void *private;
};
#ifdef CONFIG_NFS_V4_1
@@ -116,6 +117,8 @@ struct pnfs_layoutdriver_type {
int (*write_end)(struct inode *inode, struct page *page, loff_t pos,
unsigned count, unsigned copied,
struct pnfs_layout_segment *lseg);
+ void (*write_end_cleanup)(struct file *filp,
+ struct pnfs_fsdata *fsdata);
void (*free_deviceid_node) (struct nfs4_deviceid_node *);
@@ -356,6 +359,8 @@ static inline void pnfs_write_end_cleanup(struct file *filp, void *fsdata)
struct nfs_server *nfss = NFS_SERVER(filp->f_dentry->d_inode);
if (fsdata && nfss->pnfs_curr_ld) {
+ if (nfss->pnfs_curr_ld->write_end_cleanup)
+ nfss->pnfs_curr_ld->write_end_cleanup(filp, fsdata);
if (nfss->pnfs_curr_ld->write_begin)
pnfs_free_fsdata(fsdata);
}