diff options
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 136fb5972acd..1333c65dd2b5 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -691,15 +691,12 @@ write_retry: goto write_retry; iolock = 0; } else if (ret == -ENOSPC && !cleared_space) { - struct xfs_eofblocks eofb = {0}; - - cleared_space = true; xfs_flush_inodes(ip->i_mount); - xfs_iunlock(ip, iolock); - eofb.eof_flags = XFS_EOF_FLAGS_SYNC; - xfs_icache_free_eofblocks(ip->i_mount, &eofb); - xfs_icache_free_cowblocks(ip->i_mount, &eofb); + cleared_space = true; + ret = xfs_inode_free_blocks(ip->i_mount, true); + if (ret) + return ret; goto write_retry; } |