From: Mr. Ubuntu Date: Thu, 12 May 2022 21:54:12 +0000 (-0400) Subject: Added new BMAP methods for 5.6(new_bmap.patch) and 5.2(old_bmap.patch) X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=6c15769f8e5eff7288612936c169ed002a23bf5c;p=wrapfs-mgmt.git Added new BMAP methods for 5.6(new_bmap.patch) and 5.2(old_bmap.patch) --- diff --git a/bug-fixes/new_bmap.patch b/bug-fixes/new_bmap.patch new file mode 100644 index 0000000..f054320 --- /dev/null +++ b/bug-fixes/new_bmap.patch @@ -0,0 +1,24 @@ +diff --git a/fs/wrapfs/mmap.c b/fs/wrapfs/mmap.c +index 9897fa585b97..3eea96f41deb 100644 +--- a/fs/wrapfs/mmap.c ++++ b/fs/wrapfs/mmap.c +@@ -84,8 +84,19 @@ static ssize_t wrapfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter) + return -EINVAL; + } + ++static sector_t wrapfs_bmap(struct address_space *mapping, sector_t block) ++{ ++ struct inode *lower_inode = wrapfs_lower_inode(mapping->host); ++ int ret = bmap(lower_inode, &block); ++ ++ if (ret) ++ return 0; ++ return block; ++} ++ + const struct address_space_operations wrapfs_aops = { + .direct_IO = wrapfs_direct_IO, ++ .bmap = wrapfs_bmap, + }; + + const struct vm_operations_struct wrapfs_vm_ops = {