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 11:55:53 +0000 (12:55 +0100)
commitd680db722516dbf2d564d2118127270b88b1b663
tree5fc46ddff028acec837e91844cf55c00a4121d13
parent42f0aba58e00aedc395460e621896532d009c64f
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