pnfs/flexfiles: protect ktime manipulation with mirror lock
authorPeng Tao <tao.peng@primarydata.com>
Fri, 26 Jun 2015 01:45:49 +0000 (09:45 +0800)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 26 Jun 2015 18:01:37 +0000 (14:01 -0400)
commit9bbd9bb40cfae5ff35710e88866fcadb0e8f91ed
tree432e168ff7408d6d5386688f79459f083f9dcfc0
parent865a7ecb2131a3ba26cc1d49daf18275375109f0
pnfs/flexfiles: protect ktime manipulation with mirror lock

It looks as if xchg() and cmpxchg() are not available for 64-bit integers on sparc32:

> New breakage seen in linux-next today:
>
> ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
> ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
> make[2]: *** [__modpost] Error 1
> make[1]: *** [modules] Error 2

Given that mirror ktime manipulation is already under mirror->lock, let's make use of the fact.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/flexfilelayout/flexfilelayout.c