Skip to content

Commit 569d205

Browse files
cmaiolinoAl Viro
authored andcommitted
ecryptfs: drop direct calls to ->bmap
Replace direct ->bmap calls by bmap() method. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 10d83e1 commit 569d205

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

fs/ecryptfs/mmap.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -524,16 +524,12 @@ static int ecryptfs_write_end(struct file *file,
524524

525525
static sector_t ecryptfs_bmap(struct address_space *mapping, sector_t block)
526526
{
527-
int rc = 0;
528-
struct inode *inode;
529-
struct inode *lower_inode;
530-
531-
inode = (struct inode *)mapping->host;
532-
lower_inode = ecryptfs_inode_to_lower(inode);
533-
if (lower_inode->i_mapping->a_ops->bmap)
534-
rc = lower_inode->i_mapping->a_ops->bmap(lower_inode->i_mapping,
535-
block);
536-
return rc;
527+
struct inode *lower_inode = ecryptfs_inode_to_lower(mapping->host);
528+
int ret = bmap(lower_inode, &block);
529+
530+
if (ret)
531+
return 0;
532+
return block;
537533
}
538534

539535
const struct address_space_operations ecryptfs_aops = {

0 commit comments

Comments
 (0)