xfs: hide xfs_icache_free_eofblocks
authorDarrick J. Wong <djwong@kernel.org>
Sat, 23 Jan 2021 00:48:40 +0000 (16:48 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 3 Feb 2021 17:18:49 +0000 (09:18 -0800)
Change the one remaining caller of xfs_icache_free_eofblocks to use our
new combined blockgc scan function instead, since we will soon be
combining the two scans.  This introduces a slight behavior change,
since the XFS_IOC_FREE_EOFBLOCKS now clears out speculative CoW
reservations in addition to post-eof blocks.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_icache.c
fs/xfs/xfs_icache.h
fs/xfs/xfs_ioctl.c

index ae0c14df0f9b5f04708d0a4dbfd85242ee1900cc..d1a849053e6838ba3cd535fb8cce8c4d4c3e76da 100644 (file)
@@ -1324,7 +1324,7 @@ xfs_inode_free_eofblocks(
        return ret;
 }
 
-int
+static int
 xfs_icache_free_eofblocks(
        struct xfs_mount        *mp,
        struct xfs_eofblocks    *eofb)
index f7dc8d1c91e59d9039709d8471d21af0b198a141..b8c2f23aa829399ed284a837cf5aff9f8ddc8215 100644 (file)
@@ -62,7 +62,6 @@ int xfs_blockgc_free_space(struct xfs_mount *mp, struct xfs_eofblocks *eofb);
 
 void xfs_inode_set_eofblocks_tag(struct xfs_inode *ip);
 void xfs_inode_clear_eofblocks_tag(struct xfs_inode *ip);
-int xfs_icache_free_eofblocks(struct xfs_mount *, struct xfs_eofblocks *);
 void xfs_eofblocks_worker(struct work_struct *);
 void xfs_queue_eofblocks(struct xfs_mount *);
 
index 3ddefb685ac6f10a63fdc04b0da4dde55f2ecc11..78f965425fa6af8c780b71f3796b0997191ce7f1 100644 (file)
@@ -2342,7 +2342,7 @@ xfs_file_ioctl(
                trace_xfs_ioc_free_eofblocks(mp, &keofb, _RET_IP_);
 
                sb_start_write(mp->m_super);
-               error = xfs_icache_free_eofblocks(mp, &keofb);
+               error = xfs_blockgc_free_space(mp, &keofb);
                sb_end_write(mp->m_super);
                return error;
        }