summaryrefslogtreecommitdiffstats
path: root/fs/erofs/inode.c
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-09-04 04:09:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-05 20:10:09 +0200
commit84947eb603719f87ec91f0ba23126e40de7a268a (patch)
tree9b4a495ae2129c7b6ed0a85bdf73bab191e1e45e /fs/erofs/inode.c
parenterofs: kill use_vmap module parameter (diff)
downloadlinux-84947eb603719f87ec91f0ba23126e40de7a268a.tar.xz
linux-84947eb603719f87ec91f0ba23126e40de7a268a.zip
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: Christoph Hellwig <hch@infradead.org> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190904020912.63925-22-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/erofs/inode.c')
-rw-r--r--fs/erofs/inode.c65
1 files changed, 33 insertions, 32 deletions
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index 8e53765a532c..5a6d3282fefb 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -193,41 +193,42 @@ static int erofs_fill_inode(struct inode *inode, int isdir)
data = page_address(page);
err = erofs_read_inode(inode, data + ofs);
- if (!err) {
- /* setup the new inode */
- switch (inode->i_mode & S_IFMT) {
- case S_IFREG:
- inode->i_op = &erofs_generic_iops;
- inode->i_fop = &generic_ro_fops;
- break;
- case S_IFDIR:
- inode->i_op = &erofs_dir_iops;
- inode->i_fop = &erofs_dir_fops;
- break;
- case S_IFLNK:
- err = erofs_fill_symlink(inode, data, ofs);
- if (err)
- 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;
+ if (err)
+ goto out_unlock;
+
+ /* setup the new inode */
+ switch (inode->i_mode & S_IFMT) {
+ case S_IFREG:
+ inode->i_op = &erofs_generic_iops;
+ inode->i_fop = &generic_ro_fops;
+ break;
+ case S_IFDIR:
+ inode->i_op = &erofs_dir_iops;
+ inode->i_fop = &erofs_dir_fops;
+ break;
+ case S_IFLNK:
+ err = erofs_fill_symlink(inode, data, ofs);
+ if (err)
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)) {
- err = z_erofs_fill_inode(inode);
- goto out_unlock;
- }
- inode->i_mapping->a_ops = &erofs_raw_access_aops;
+ if (erofs_inode_is_data_compressed(vi->datalayout)) {
+ err = z_erofs_fill_inode(inode);
+ goto out_unlock;
}
+ inode->i_mapping->a_ops = &erofs_raw_access_aops;
out_unlock:
unlock_page(page);