xfs: fix AIM7 regression
authorChristoph Hellwig <[email protected]>
Tue, 24 Oct 2017 01:31:50 +0000 (18:31 -0700)
committerDarrick J. Wong <[email protected]>
Tue, 24 Oct 2017 01:31:50 +0000 (18:31 -0700)
commit942491c9e6d631c012f3c4ea8e7777b0b02edeab
treeb316042eb963aaede79c0ce3aa1ac8772a38f4db
parent785545c8982604fe3ba79d16409e83993be77d5e
xfs: fix AIM7 regression

Apparently our current rwsem code doesn't like doing the trylock, then
lock for real scheme.  So change our read/write methods to just do the
trylock for the RWF_NOWAIT case.  This fixes a ~25% regression in
AIM7.

Fixes: 91f9943e ("fs: support RWF_NOWAIT for buffered reads")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
fs/xfs/xfs_file.c