Commit a7255350 authored by Pratik Shinde's avatar Pratik Shinde Committed by Greg Kroah-Hartman

staging: erofs: removing an extra call to iloc() in fill_inode()

in fill_inode() we call iloc() twice.Avoiding the extra call by
storing the result.
Signed-off-by: default avatarPratik Shinde <pratikshinde320@gmail.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Cc: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190813203840.13782-1-pratikshinde320@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c391818a
...@@ -161,11 +161,12 @@ static int fill_inode(struct inode *inode, int isdir) ...@@ -161,11 +161,12 @@ static int fill_inode(struct inode *inode, int isdir)
int err; int err;
erofs_blk_t blkaddr; erofs_blk_t blkaddr;
unsigned int ofs; unsigned int ofs;
erofs_off_t inode_loc;
trace_erofs_fill_inode(inode, isdir); trace_erofs_fill_inode(inode, isdir);
inode_loc = iloc(sbi, vi->nid);
blkaddr = erofs_blknr(iloc(sbi, vi->nid)); blkaddr = erofs_blknr(inode_loc);
ofs = erofs_blkoff(iloc(sbi, vi->nid)); ofs = erofs_blkoff(inode_loc);
debugln("%s, reading inode nid %llu at %u of blkaddr %u", debugln("%s, reading inode nid %llu at %u of blkaddr %u",
__func__, vi->nid, ofs, blkaddr); __func__, vi->nid, ofs, blkaddr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment