From 44d5aba0bec9ae5538c37e2d018b90555f4b3f02 Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Fri, 30 Nov 2012 15:45:55 +0800 Subject: [PATCH] LU-2388 statahead: don't statahead if it's stopped Statahead may be stopped but lli->lli_sai is not NULL(inflight statahead RPCs), so check lli->lli_opendir_key before accessing statahead data. Signed-off-by: Lai Siyao Change-Id: I4bcd4da0dc2913697473bf85ff6e502df43ce5a2 Reviewed-on: http://review.whamcloud.com/4718 Tested-by: Hudson Reviewed-by: Fan Yong Tested-by: Maloo Reviewed-by: Peng Tao Reviewed-by: Oleg Drokin --- lustre/llite/llite_internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index ea34779..c8f0f3b 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -1298,6 +1298,10 @@ ll_statahead_enter(struct inode *dir, struct dentry **dentryp, int only_unplug) if (lli->lli_opendir_pid != cfs_curproc_pid()) return -EAGAIN; + /* statahead has been stopped */ + if (lli->lli_opendir_key == NULL) + return -EAGAIN; + ldd = ll_d2d(*dentryp); /* * When stats a dentry, the system trigger more than once "revalidate" -- 1.8.3.1