From: Peng Tao Date: Thu, 3 Jul 2014 05:07:45 +0000 (+0800) Subject: pnfs/filelayout: fix race between mark_request_commit and scan_commit_lists X-Git-Tag: omap-for-v3.17/fixes-against-rc2~82^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8a3292d246f3ed326698ed6acf3286c62b7bf11;p=pandora-kernel.git pnfs/filelayout: fix race between mark_request_commit and scan_commit_lists We need to hold cinfo lock while setting bucket->wlseg and adding req to nwritten list at the same time. Otherwise there might be a window where nwritten list is empty yet we set bucket->wlseg, in which case ff_layout_scan_ds_commit_list() may end up clearing bucket->wlseg incorrectly, casuing client to oops later on. This was found when testing flexfile layout but filelayout has the same problem. Signed-off-by: Peng Tao Signed-off-by: Tom Haynes Signed-off-by: Trond Myklebust --- Reading git-diff-tree failed