summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorCarlos Maiolino <cmaiolino@redhat.com>2020-01-09 14:30:43 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2020-02-03 08:05:57 -0500
commit569d2056def7add85c0a9add03c19017e5525012 (patch)
tree66b42ed64124c4139b760b26a088d4945da62d91 /fs/ecryptfs
parent10d83e11a582631a14579a087a55608075c6f539 (diff)
downloadblackbird-op-linux-569d2056def7add85c0a9add03c19017e5525012.tar.gz
blackbird-op-linux-569d2056def7add85c0a9add03c19017e5525012.zip
ecryptfs: drop direct calls to ->bmap
Replace direct ->bmap calls by bmap() method. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/mmap.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index cffa0c1ec829..019572c6b39a 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -524,16 +524,12 @@ out:
static sector_t ecryptfs_bmap(struct address_space *mapping, sector_t block)
{
- int rc = 0;
- struct inode *inode;
- struct inode *lower_inode;
-
- inode = (struct inode *)mapping->host;
- lower_inode = ecryptfs_inode_to_lower(inode);
- if (lower_inode->i_mapping->a_ops->bmap)
- rc = lower_inode->i_mapping->a_ops->bmap(lower_inode->i_mapping,
- block);
- return rc;
+ struct inode *lower_inode = ecryptfs_inode_to_lower(mapping->host);
+ int ret = bmap(lower_inode, &block);
+
+ if (ret)
+ return 0;
+ return block;
}
const struct address_space_operations ecryptfs_aops = {
OpenPOWER on IntegriCloud