OSDN Git Service

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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Jan 2018 01:26:24 +0000 (17:26 -0800)
commit6793f1c450b1533a5e9c2493490de771d38b24f9
tree5d821cb1fa344cb6c99f9a58e2da5e68ed039653
parent6e20630e300486045bf480139c9e17e7071629ce
orangefs: fix deadlock; do not write i_size in read_iter

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>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/orangefs/file.c
fs/orangefs/orangefs-kernel.h