]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb829f04802d7b4e3d838bca3e50b1faebf04d70e
tree432e168ff7408d6d5386688f79459f083f9dcfc0
parent25d5df05baea84d238664a179ed4076d20dbfe58
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