OSDN Git Service

orangefs: truncate before updating size
authorMartin Brandenburg <martin@omnibond.com>
Mon, 29 Apr 2019 17:09:48 +0000 (17:09 +0000)
committerMike Marshall <hubcap@omnibond.com>
Fri, 3 May 2019 18:39:10 +0000 (14:39 -0400)
commit33713cd09ccdc1e01b10d0782ae60200d4989553
tree00fcddbe2e98e1aa7d5cbff2794c08f1ce3903cb
parentdd59a6475c4cf69afac2ade01ab732b7825a2a45
orangefs: truncate before updating size

Otherwise we race with orangefs_writepage/orangefs_writepages
which and does not expect i_size < page_offset.

Fixes xfstests generic/129.

Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/inode.c