Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfs/pnfs.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 746b039..414b7dc 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -393,8 +393,10 @@ pnfs_destroy_layout(struct nfs_inode *nfsi) }; lo = get_lock_current_layout(nfsi); - pnfs_free_layout(lo, &range); - put_unlock_current_layout(lo); + if (lo) { + pnfs_free_layout(lo, &range); + put_unlock_current_layout(lo); + } } static inline void -- 1.6.4.4 -- 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