diff options
author | Russell King | 2019-12-09 11:08:44 +0000 |
---|---|---|
committer | Al Viro | 2020-01-20 20:12:40 -0500 |
commit | 7b1952676256d2cdc03d0415a4c0e6bfb64e00ff (patch) | |
tree | 1525b175967b2907484ea4ebbe2693bcb3c06694 /fs/adfs/map.c | |
parent | 6092b6be304494e311b65935f5e09b510cbd57cc (diff) |
fs/adfs: map: factor out map cleanup
We have several places which deal with releasing the map buffers and
freeing the map array. Provide a helper for this.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/map.c')
-rw-r--r-- | fs/adfs/map.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/adfs/map.c b/fs/adfs/map.c index 4b677cd5d015..8ba8877110ff 100644 --- a/fs/adfs/map.c +++ b/fs/adfs/map.c @@ -421,3 +421,11 @@ error_free: kfree(dm); return ERR_PTR(-EIO); } + +void adfs_free_map(struct super_block *sb) +{ + struct adfs_sb_info *asb = ADFS_SB(sb); + + adfs_map_relse(asb->s_map, asb->s_map_size); + kfree(asb->s_map); +} |