diff options
| -rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 1f2ac3dd0fe5..b0fa83a60754 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
| @@ -1842,6 +1842,10 @@ static int ff_layout_initiate_commit(struct nfs_commit_data *data, int how) | |||
| 1842 | int vers, ret; | 1842 | int vers, ret; |
| 1843 | struct nfs_fh *fh; | 1843 | struct nfs_fh *fh; |
| 1844 | 1844 | ||
| 1845 | if (!lseg || !(pnfs_is_valid_lseg(lseg) || | ||
| 1846 | test_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags))) | ||
| 1847 | goto out_err; | ||
| 1848 | |||
| 1845 | idx = calc_ds_index_from_commit(lseg, data->ds_commit_index); | 1849 | idx = calc_ds_index_from_commit(lseg, data->ds_commit_index); |
| 1846 | ds = nfs4_ff_layout_prepare_ds(lseg, idx, true); | 1850 | ds = nfs4_ff_layout_prepare_ds(lseg, idx, true); |
| 1847 | if (!ds) | 1851 | if (!ds) |
