excessive checks in ufs_write_failed() and ufs_evict_inode()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Jun 2017 20:20:34 +0000 (16:20 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Sep 2017 17:30:53 +0000 (18:30 +0100)
commit91e39600bf8a89d392a092448cb509caa1645bc0
treec9c1dd295c9e4a9749ad628eca861ec20c3c4617
parent981b726802cc71b54d67ab48804321a6a64e1907
excessive checks in ufs_write_failed() and ufs_evict_inode()

commit babef37dccbaa49249a22bae9150686815d7be71 upstream.

As it is, short copy in write() to append-only file will fail
to truncate the excessive allocated blocks.  As the matter of
fact, all checks in ufs_truncate_blocks() are either redundant
or wrong for that caller.  As for the only other caller
(ufs_evict_inode()), we only need the file type checks there.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[bwh: Backported to 3.2:
 - No functions need to be renamed
 - Adjust filenames, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ufs/inode.c
fs/ufs/truncate.c