Commit 84947eb6 authored by Gao Xiang's avatar Gao Xiang Committed by Greg Kroah-Hartman

erofs: save one level of indentation

As Christoph said [1], ".. and save one
level of indentation."

[1] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/Reported-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarGao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190904020912.63925-22-gaoxiang25@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 73d03931
...@@ -193,41 +193,42 @@ static int erofs_fill_inode(struct inode *inode, int isdir) ...@@ -193,41 +193,42 @@ static int erofs_fill_inode(struct inode *inode, int isdir)
data = page_address(page); data = page_address(page);
err = erofs_read_inode(inode, data + ofs); err = erofs_read_inode(inode, data + ofs);
if (!err) { if (err)
/* setup the new inode */ goto out_unlock;
switch (inode->i_mode & S_IFMT) {
case S_IFREG: /* setup the new inode */
inode->i_op = &erofs_generic_iops; switch (inode->i_mode & S_IFMT) {
inode->i_fop = &generic_ro_fops; case S_IFREG:
break; inode->i_op = &erofs_generic_iops;
case S_IFDIR: inode->i_fop = &generic_ro_fops;
inode->i_op = &erofs_dir_iops; break;
inode->i_fop = &erofs_dir_fops; case S_IFDIR:
break; inode->i_op = &erofs_dir_iops;
case S_IFLNK: inode->i_fop = &erofs_dir_fops;
err = erofs_fill_symlink(inode, data, ofs); break;
if (err) case S_IFLNK:
goto out_unlock; err = erofs_fill_symlink(inode, data, ofs);
inode_nohighmem(inode); if (err)
break;
case S_IFCHR:
case S_IFBLK:
case S_IFIFO:
case S_IFSOCK:
inode->i_op = &erofs_generic_iops;
init_special_inode(inode, inode->i_mode, inode->i_rdev);
goto out_unlock;
default:
err = -EFSCORRUPTED;
goto out_unlock; goto out_unlock;
} inode_nohighmem(inode);
break;
case S_IFCHR:
case S_IFBLK:
case S_IFIFO:
case S_IFSOCK:
inode->i_op = &erofs_generic_iops;
init_special_inode(inode, inode->i_mode, inode->i_rdev);
goto out_unlock;
default:
err = -EFSCORRUPTED;
goto out_unlock;
}
if (erofs_inode_is_data_compressed(vi->datalayout)) { if (erofs_inode_is_data_compressed(vi->datalayout)) {
err = z_erofs_fill_inode(inode); err = z_erofs_fill_inode(inode);
goto out_unlock; goto out_unlock;
}
inode->i_mapping->a_ops = &erofs_raw_access_aops;
} }
inode->i_mapping->a_ops = &erofs_raw_access_aops;
out_unlock: out_unlock:
unlock_page(page); unlock_page(page);
......
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