xfs: remove unnecessary shutdown check from xfs_iflush()
The shutdown check in xfs_iflush() duplicates checks down in the buffer code. If the fs is shut down, xfs_trans_read_buf_map() always returns an error and falls into the same error path. Remove the unnecessary check along with the warning in xfs_imap_to_bp() that generates excessive noise in the log if the fs is shut down. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
f20192991d
commit
15fab3b9be
@@ -172,12 +172,7 @@ xfs_imap_to_bp(
|
||||
(int)imap->im_len, buf_flags, &bp,
|
||||
&xfs_inode_buf_ops);
|
||||
if (error) {
|
||||
if (error == -EAGAIN) {
|
||||
ASSERT(buf_flags & XBF_TRYLOCK);
|
||||
return error;
|
||||
}
|
||||
xfs_warn(mp, "%s: xfs_trans_read_buf() returned error %d.",
|
||||
__func__, error);
|
||||
ASSERT(error != -EAGAIN || (buf_flags & XBF_TRYLOCK));
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user