From: Tom Haynes <loghyr@xxxxxxxxxxxxxxx> Callers of pnfs_put_lseg_async() might encounter no writes to be committed, etc. As such, do not attempt to add work if none is needed. Also, don't oops if that is the case. Signed-off-by: Tom Haynes <loghyr@xxxxxxxxxxxxxxx> --- fs/nfs/pnfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 76de7f5..08b1060 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -373,6 +373,9 @@ static void pnfs_put_lseg_async_work(struct work_struct *work) void pnfs_put_lseg_async(struct pnfs_layout_segment *lseg) { + if (!lseg) + return; + INIT_WORK(&lseg->pls_work, pnfs_put_lseg_async_work); schedule_work(&lseg->pls_work); } -- 1.9.3 -- 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