orangefs: fix deadlock; do not write i_size in read_iter
authorMartin Brandenburg <martin@omnibond.com>
Fri, 26 Jan 2018 00:39:44 +0000 (19:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:43 +0000 (14:03 +0100)
commit326efb49e153fbb9ccacaed9858bd9da91204061
treed0a255f98d48540256391a0aafefd75babb98d96
parentd529ba9b270c8713440c63f64af6a7d522591990
orangefs: fix deadlock; do not write i_size in read_iter

commit 6793f1c450b1533a5e9c2493490de771d38b24f9 upstream.

After do_readv_writev, the inode cache is invalidated anyway, so i_size
will never be read.  It will be fetched from the server which will also
know about updates from other machines.

Fixes deadlock on 32-bit SMP.

See https://marc.info/?l=linux-fsdevel&m=151268557427760&w=2

Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/orangefs/file.c
fs/orangefs/orangefs-kernel.h