blob: 2345f1de438e628fdee75abf23715b8dcc3c549e [file] [log] [blame]
Gao Xiang29b24f62019-07-31 23:57:31 +08001// SPDX-License-Identifier: GPL-2.0-only
Gao Xiang431339b2018-07-26 20:21:48 +08002/*
Gao Xiang431339b2018-07-26 20:21:48 +08003 * Copyright (C) 2017-2018 HUAWEI, Inc.
Alexander A. Klimov592e7cd2020-07-13 15:09:44 +02004 * https://www.huawei.com/
Gao Xiangc5aa9032021-08-20 18:00:19 +08005 * Copyright (C) 2021, Alibaba Cloud
Gao Xiang431339b2018-07-26 20:21:48 +08006 */
Gao Xiangb17500a2018-07-26 20:21:52 +08007#include "xattr.h"
Gao Xiang431339b2018-07-26 20:21:48 +08008
Chao Yu13f06f42018-07-26 20:21:55 +08009#include <trace/events/erofs.h>
10
Gao Xiang0dcd3c92020-07-30 01:58:01 +080011/*
12 * if inode is successfully read, return its inode page (or sometimes
13 * the inode payload page if it's an extended inode) in order to fill
14 * inline data if possible.
15 */
16static struct page *erofs_read_inode(struct inode *inode,
17 unsigned int *ofs)
Gao Xiang431339b2018-07-26 20:21:48 +080018{
Gao Xiang0dcd3c92020-07-30 01:58:01 +080019 struct super_block *sb = inode->i_sb;
20 struct erofs_sb_info *sbi = EROFS_SB(sb);
Gao Xianga5876e22019-09-04 10:08:56 +080021 struct erofs_inode *vi = EROFS_I(inode);
Gao Xiang0dcd3c92020-07-30 01:58:01 +080022 const erofs_off_t inode_loc = iloc(sbi, vi->nid);
Gao Xiang8a765682019-09-04 10:08:54 +080023
Gao Xiang0dcd3c92020-07-30 01:58:01 +080024 erofs_blk_t blkaddr, nblks = 0;
25 struct page *page;
26 struct erofs_inode_compact *dic;
27 struct erofs_inode_extended *die, *copied = NULL;
28 unsigned int ifmt;
29 int err;
30
31 blkaddr = erofs_blknr(inode_loc);
32 *ofs = erofs_blkoff(inode_loc);
33
34 erofs_dbg("%s, reading inode nid %llu at %u of blkaddr %u",
35 __func__, vi->nid, *ofs, blkaddr);
36
37 page = erofs_get_meta_page(sb, blkaddr);
38 if (IS_ERR(page)) {
39 erofs_err(sb, "failed to get inode (nid: %llu) page, err %ld",
40 vi->nid, PTR_ERR(page));
41 return page;
42 }
43
44 dic = page_address(page) + *ofs;
45 ifmt = le16_to_cpu(dic->i_format);
Gao Xiang431339b2018-07-26 20:21:48 +080046
Gao Xiang24a806d2021-03-29 08:36:14 +080047 if (ifmt & ~EROFS_I_ALL) {
48 erofs_err(inode->i_sb, "unsupported i_format %u of nid %llu",
49 ifmt, vi->nid);
50 err = -EOPNOTSUPP;
51 goto err_out;
52 }
53
Gao Xiang8a765682019-09-04 10:08:54 +080054 vi->datalayout = erofs_inode_datalayout(ifmt);
Gao Xiang8a765682019-09-04 10:08:54 +080055 if (vi->datalayout >= EROFS_INODE_DATALAYOUT_MAX) {
Gao Xiang4f761fa2019-09-04 10:09:09 +080056 erofs_err(inode->i_sb, "unsupported datalayout %u of nid %llu",
57 vi->datalayout, vi->nid);
Gao Xiang0dcd3c92020-07-30 01:58:01 +080058 err = -EOPNOTSUPP;
59 goto err_out;
Gao Xiang431339b2018-07-26 20:21:48 +080060 }
61
Gao Xiang8a765682019-09-04 10:08:54 +080062 switch (erofs_inode_version(ifmt)) {
63 case EROFS_INODE_LAYOUT_EXTENDED:
Gao Xiang8a765682019-09-04 10:08:54 +080064 vi->inode_isize = sizeof(struct erofs_inode_extended);
Gao Xiang0dcd3c92020-07-30 01:58:01 +080065 /* check if the inode acrosses page boundary */
66 if (*ofs + vi->inode_isize <= PAGE_SIZE) {
67 *ofs += vi->inode_isize;
68 die = (struct erofs_inode_extended *)dic;
69 } else {
70 const unsigned int gotten = PAGE_SIZE - *ofs;
71
72 copied = kmalloc(vi->inode_isize, GFP_NOFS);
73 if (!copied) {
74 err = -ENOMEM;
75 goto err_out;
76 }
77 memcpy(copied, dic, gotten);
78 unlock_page(page);
79 put_page(page);
80
81 page = erofs_get_meta_page(sb, blkaddr + 1);
82 if (IS_ERR(page)) {
83 erofs_err(sb, "failed to get inode payload page (nid: %llu), err %ld",
84 vi->nid, PTR_ERR(page));
85 kfree(copied);
86 return page;
87 }
88 *ofs = vi->inode_isize - gotten;
89 memcpy((u8 *)copied + gotten, page_address(page), *ofs);
90 die = copied;
91 }
Gao Xiang8a765682019-09-04 10:08:54 +080092 vi->xattr_isize = erofs_xattr_ibody_size(die->i_xattr_icount);
Gao Xiang431339b2018-07-26 20:21:48 +080093
Gao Xiang8a765682019-09-04 10:08:54 +080094 inode->i_mode = le16_to_cpu(die->i_mode);
95 switch (inode->i_mode & S_IFMT) {
96 case S_IFREG:
97 case S_IFDIR:
98 case S_IFLNK:
99 vi->raw_blkaddr = le32_to_cpu(die->i_u.raw_blkaddr);
100 break;
101 case S_IFCHR:
102 case S_IFBLK:
Chao Yud5beb31b2018-07-26 20:21:53 +0800103 inode->i_rdev =
Gao Xiang8a765682019-09-04 10:08:54 +0800104 new_decode_dev(le32_to_cpu(die->i_u.rdev));
105 break;
106 case S_IFIFO:
107 case S_IFSOCK:
Chao Yud5beb31b2018-07-26 20:21:53 +0800108 inode->i_rdev = 0;
Gao Xiang8a765682019-09-04 10:08:54 +0800109 break;
110 default:
Gao Xianga6b9b1d2019-08-14 18:37:03 +0800111 goto bogusimode;
Gao Xiang8a765682019-09-04 10:08:54 +0800112 }
113 i_uid_write(inode, le32_to_cpu(die->i_uid));
114 i_gid_write(inode, le32_to_cpu(die->i_gid));
115 set_nlink(inode, le32_to_cpu(die->i_nlink));
Gao Xiang431339b2018-07-26 20:21:48 +0800116
Gao Xiangd3938ee2020-11-01 03:51:02 +0800117 /* extended inode has its own timestamp */
118 inode->i_ctime.tv_sec = le64_to_cpu(die->i_ctime);
119 inode->i_ctime.tv_nsec = le32_to_cpu(die->i_ctime_nsec);
Gao Xiang431339b2018-07-26 20:21:48 +0800120
Gao Xiang8a765682019-09-04 10:08:54 +0800121 inode->i_size = le64_to_cpu(die->i_size);
Gao Xiangfe6d9872019-05-28 11:19:43 +0800122
123 /* total blocks for compressed files */
Gao Xiang8a765682019-09-04 10:08:54 +0800124 if (erofs_inode_is_data_compressed(vi->datalayout))
125 nblks = le32_to_cpu(die->i_u.compressed_blocks);
Gao Xiangc5aa9032021-08-20 18:00:19 +0800126 else if (vi->datalayout == EROFS_INODE_CHUNK_BASED)
127 /* fill chunked inode summary info */
128 vi->chunkformat = le16_to_cpu(die->i_u.c.format);
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800129 kfree(copied);
Gao Xiang1266b4a2021-08-25 20:07:57 +0800130 copied = NULL;
Gao Xiang8a765682019-09-04 10:08:54 +0800131 break;
132 case EROFS_INODE_LAYOUT_COMPACT:
133 vi->inode_isize = sizeof(struct erofs_inode_compact);
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800134 *ofs += vi->inode_isize;
Gao Xiang8a765682019-09-04 10:08:54 +0800135 vi->xattr_isize = erofs_xattr_ibody_size(dic->i_xattr_icount);
Gao Xiang431339b2018-07-26 20:21:48 +0800136
Gao Xiang8a765682019-09-04 10:08:54 +0800137 inode->i_mode = le16_to_cpu(dic->i_mode);
138 switch (inode->i_mode & S_IFMT) {
139 case S_IFREG:
140 case S_IFDIR:
141 case S_IFLNK:
142 vi->raw_blkaddr = le32_to_cpu(dic->i_u.raw_blkaddr);
143 break;
144 case S_IFCHR:
145 case S_IFBLK:
Chao Yud5beb31b2018-07-26 20:21:53 +0800146 inode->i_rdev =
Gao Xiang8a765682019-09-04 10:08:54 +0800147 new_decode_dev(le32_to_cpu(dic->i_u.rdev));
148 break;
149 case S_IFIFO:
150 case S_IFSOCK:
Chao Yud5beb31b2018-07-26 20:21:53 +0800151 inode->i_rdev = 0;
Gao Xiang8a765682019-09-04 10:08:54 +0800152 break;
153 default:
Gao Xianga6b9b1d2019-08-14 18:37:03 +0800154 goto bogusimode;
Gao Xiang8a765682019-09-04 10:08:54 +0800155 }
156 i_uid_write(inode, le16_to_cpu(dic->i_uid));
157 i_gid_write(inode, le16_to_cpu(dic->i_gid));
158 set_nlink(inode, le16_to_cpu(dic->i_nlink));
Gao Xiang431339b2018-07-26 20:21:48 +0800159
Gao Xiangd3938ee2020-11-01 03:51:02 +0800160 /* use build time for compact inodes */
161 inode->i_ctime.tv_sec = sbi->build_time;
162 inode->i_ctime.tv_nsec = sbi->build_time_nsec;
Gao Xiang431339b2018-07-26 20:21:48 +0800163
Gao Xiang8a765682019-09-04 10:08:54 +0800164 inode->i_size = le32_to_cpu(dic->i_size);
165 if (erofs_inode_is_data_compressed(vi->datalayout))
166 nblks = le32_to_cpu(dic->i_u.compressed_blocks);
Gao Xiangc5aa9032021-08-20 18:00:19 +0800167 else if (vi->datalayout == EROFS_INODE_CHUNK_BASED)
168 vi->chunkformat = le16_to_cpu(dic->i_u.c.format);
Gao Xiang8a765682019-09-04 10:08:54 +0800169 break;
170 default:
Gao Xiang4f761fa2019-09-04 10:09:09 +0800171 erofs_err(inode->i_sb,
172 "unsupported on-disk inode version %u of nid %llu",
173 erofs_inode_version(ifmt), vi->nid);
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800174 err = -EOPNOTSUPP;
175 goto err_out;
Gao Xiang431339b2018-07-26 20:21:48 +0800176 }
177
Gao Xiangc5aa9032021-08-20 18:00:19 +0800178 if (vi->datalayout == EROFS_INODE_CHUNK_BASED) {
Gao Xiangd7051172021-09-22 17:51:41 +0800179 if (vi->chunkformat & ~EROFS_CHUNK_FORMAT_ALL) {
Gao Xiangc5aa9032021-08-20 18:00:19 +0800180 erofs_err(inode->i_sb,
181 "unsupported chunk format %x of nid %llu",
182 vi->chunkformat, vi->nid);
183 err = -EOPNOTSUPP;
184 goto err_out;
185 }
186 vi->chunkbits = LOG_BLOCK_SIZE +
187 (vi->chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK);
188 }
Gao Xiangd3938ee2020-11-01 03:51:02 +0800189 inode->i_mtime.tv_sec = inode->i_ctime.tv_sec;
190 inode->i_atime.tv_sec = inode->i_ctime.tv_sec;
191 inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec;
192 inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec;
193
Gao Xiang06252e92021-08-05 08:36:00 +0800194 inode->i_flags &= ~S_DAX;
Gao Xiange6242462021-10-07 15:02:23 +0800195 if (test_opt(&sbi->opt, DAX_ALWAYS) && S_ISREG(inode->i_mode) &&
Gao Xiang06252e92021-08-05 08:36:00 +0800196 vi->datalayout == EROFS_INODE_FLAT_PLAIN)
197 inode->i_flags |= S_DAX;
Gao Xiangfe6d9872019-05-28 11:19:43 +0800198 if (!nblks)
199 /* measure inode.i_blocks as generic filesystems */
200 inode->i_blocks = roundup(inode->i_size, EROFS_BLKSIZ) >> 9;
201 else
202 inode->i_blocks = nblks << LOG_SECTORS_PER_BLOCK;
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800203 return page;
Gao Xianga6b9b1d2019-08-14 18:37:03 +0800204
205bogusimode:
Gao Xiang4f761fa2019-09-04 10:09:09 +0800206 erofs_err(inode->i_sb, "bogus i_mode (%o) @ nid %llu",
207 inode->i_mode, vi->nid);
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800208 err = -EFSCORRUPTED;
209err_out:
Gao Xianga6b9b1d2019-08-14 18:37:03 +0800210 DBG_BUGON(1);
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800211 kfree(copied);
212 unlock_page(page);
213 put_page(page);
214 return ERR_PTR(err);
Gao Xiang431339b2018-07-26 20:21:48 +0800215}
216
Gao Xianga2c75c82019-09-04 10:08:59 +0800217static int erofs_fill_symlink(struct inode *inode, void *data,
218 unsigned int m_pofs)
Gao Xiang431339b2018-07-26 20:21:48 +0800219{
Gao Xianga5876e22019-09-04 10:08:56 +0800220 struct erofs_inode *vi = EROFS_I(inode);
Gao Xianga2c75c82019-09-04 10:08:59 +0800221 char *lnk;
Gao Xiang431339b2018-07-26 20:21:48 +0800222
Gao Xianga2c75c82019-09-04 10:08:59 +0800223 /* if it cannot be handled with fast symlink scheme */
224 if (vi->datalayout != EROFS_INODE_FLAT_INLINE ||
225 inode->i_size >= PAGE_SIZE) {
226 inode->i_op = &erofs_symlink_iops;
Gao Xiang431339b2018-07-26 20:21:48 +0800227 return 0;
Gao Xiang431339b2018-07-26 20:21:48 +0800228 }
Gao Xianga2c75c82019-09-04 10:08:59 +0800229
Gao Xiange2c71e72019-09-04 10:09:06 +0800230 lnk = kmalloc(inode->i_size + 1, GFP_KERNEL);
Gao Xianga2c75c82019-09-04 10:08:59 +0800231 if (!lnk)
232 return -ENOMEM;
233
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800234 m_pofs += vi->xattr_isize;
Gao Xianga2c75c82019-09-04 10:08:59 +0800235 /* inline symlink data shouldn't cross page boundary as well */
236 if (m_pofs + inode->i_size > PAGE_SIZE) {
237 kfree(lnk);
Gao Xiang4f761fa2019-09-04 10:09:09 +0800238 erofs_err(inode->i_sb,
239 "inline data cross block boundary @ nid %llu",
240 vi->nid);
Gao Xianga2c75c82019-09-04 10:08:59 +0800241 DBG_BUGON(1);
242 return -EFSCORRUPTED;
243 }
244
245 memcpy(lnk, data + m_pofs, inode->i_size);
246 lnk[inode->i_size] = '\0';
247
248 inode->i_link = lnk;
249 inode->i_op = &erofs_fast_symlink_iops;
Yue Hu55457452019-06-27 17:46:15 +0800250 return 0;
Gao Xiang431339b2018-07-26 20:21:48 +0800251}
252
Gao Xiang99634bf2019-09-04 10:09:05 +0800253static int erofs_fill_inode(struct inode *inode, int isdir)
Gao Xiang431339b2018-07-26 20:21:48 +0800254{
Gao Xianga5876e22019-09-04 10:08:56 +0800255 struct erofs_inode *vi = EROFS_I(inode);
Gao Xiang431339b2018-07-26 20:21:48 +0800256 struct page *page;
Thomas Weißschuh7dd68b12018-09-10 21:41:14 +0200257 unsigned int ofs;
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800258 int err = 0;
Gao Xiang431339b2018-07-26 20:21:48 +0800259
Chao Yu13f06f42018-07-26 20:21:55 +0800260 trace_erofs_fill_inode(inode, isdir);
Gao Xiang431339b2018-07-26 20:21:48 +0800261
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800262 /* read inode base data from disk */
263 page = erofs_read_inode(inode, &ofs);
264 if (IS_ERR(page))
Gao Xiang431339b2018-07-26 20:21:48 +0800265 return PTR_ERR(page);
Gao Xiang431339b2018-07-26 20:21:48 +0800266
Gao Xiang84947eb2019-09-04 10:09:08 +0800267 /* setup the new inode */
268 switch (inode->i_mode & S_IFMT) {
269 case S_IFREG:
270 inode->i_op = &erofs_generic_iops;
Huang Jianana08e67a2021-08-05 08:35:59 +0800271 if (erofs_inode_is_data_compressed(vi->datalayout))
272 inode->i_fop = &generic_ro_fops;
273 else
274 inode->i_fop = &erofs_file_fops;
Gao Xiang84947eb2019-09-04 10:09:08 +0800275 break;
276 case S_IFDIR:
277 inode->i_op = &erofs_dir_iops;
278 inode->i_fop = &erofs_dir_fops;
279 break;
280 case S_IFLNK:
Gao Xiang0dcd3c92020-07-30 01:58:01 +0800281 err = erofs_fill_symlink(inode, page_address(page), ofs);
Gao Xiang84947eb2019-09-04 10:09:08 +0800282 if (err)
Gao Xiang431339b2018-07-26 20:21:48 +0800283 goto out_unlock;
Gao Xiang84947eb2019-09-04 10:09:08 +0800284 inode_nohighmem(inode);
285 break;
286 case S_IFCHR:
287 case S_IFBLK:
288 case S_IFIFO:
289 case S_IFSOCK:
290 inode->i_op = &erofs_generic_iops;
291 init_special_inode(inode, inode->i_mode, inode->i_rdev);
292 goto out_unlock;
293 default:
294 err = -EFSCORRUPTED;
295 goto out_unlock;
Gao Xiang431339b2018-07-26 20:21:48 +0800296 }
297
Gao Xiang84947eb2019-09-04 10:09:08 +0800298 if (erofs_inode_is_data_compressed(vi->datalayout)) {
299 err = z_erofs_fill_inode(inode);
300 goto out_unlock;
301 }
302 inode->i_mapping->a_ops = &erofs_raw_access_aops;
303
Gao Xiang431339b2018-07-26 20:21:48 +0800304out_unlock:
305 unlock_page(page);
306 put_page(page);
307 return err;
308}
309
Gao Xiang2abd7812018-10-09 22:07:13 +0800310/*
311 * erofs nid is 64bits, but i_ino is 'unsigned long', therefore
312 * we should do more for 32-bit platform to find the right inode.
313 */
Gao Xiang2abd7812018-10-09 22:07:13 +0800314static int erofs_ilookup_test_actor(struct inode *inode, void *opaque)
315{
316 const erofs_nid_t nid = *(erofs_nid_t *)opaque;
317
Gao Xianga5876e22019-09-04 10:08:56 +0800318 return EROFS_I(inode)->nid == nid;
Gao Xiang2abd7812018-10-09 22:07:13 +0800319}
320
321static int erofs_iget_set_actor(struct inode *inode, void *opaque)
322{
323 const erofs_nid_t nid = *(erofs_nid_t *)opaque;
324
325 inode->i_ino = erofs_inode_hash(nid);
326 return 0;
327}
Gao Xiang2abd7812018-10-09 22:07:13 +0800328
329static inline struct inode *erofs_iget_locked(struct super_block *sb,
330 erofs_nid_t nid)
331{
332 const unsigned long hashval = erofs_inode_hash(nid);
333
Gao Xiang2abd7812018-10-09 22:07:13 +0800334 return iget5_locked(sb, hashval, erofs_ilookup_test_actor,
335 erofs_iget_set_actor, &nid);
Gao Xiang2abd7812018-10-09 22:07:13 +0800336}
337
Gao Xiang431339b2018-07-26 20:21:48 +0800338struct inode *erofs_iget(struct super_block *sb,
Julian Merida447a3622019-03-18 20:58:41 -0300339 erofs_nid_t nid,
340 bool isdir)
Gao Xiang431339b2018-07-26 20:21:48 +0800341{
Gao Xiang2abd7812018-10-09 22:07:13 +0800342 struct inode *inode = erofs_iget_locked(sb, nid);
Gao Xiang431339b2018-07-26 20:21:48 +0800343
Gao Xiang8d8a09b2019-08-30 00:38:27 +0800344 if (!inode)
Gao Xiang431339b2018-07-26 20:21:48 +0800345 return ERR_PTR(-ENOMEM);
346
347 if (inode->i_state & I_NEW) {
348 int err;
Gao Xianga5876e22019-09-04 10:08:56 +0800349 struct erofs_inode *vi = EROFS_I(inode);
Julio Bianco8af36472019-03-09 14:08:53 -0300350
Gao Xiang431339b2018-07-26 20:21:48 +0800351 vi->nid = nid;
352
Gao Xiang99634bf2019-09-04 10:09:05 +0800353 err = erofs_fill_inode(inode, isdir);
Gao Xiang8d8a09b2019-08-30 00:38:27 +0800354 if (!err)
Gao Xiang431339b2018-07-26 20:21:48 +0800355 unlock_new_inode(inode);
356 else {
357 iget_failed(inode);
358 inode = ERR_PTR(err);
359 }
360 }
361 return inode;
362}
363
Christian Brauner549c7292021-01-21 14:19:43 +0100364int erofs_getattr(struct user_namespace *mnt_userns, const struct path *path,
365 struct kstat *stat, u32 request_mask,
366 unsigned int query_flags)
Gao Xiang89f27ed2019-05-28 11:19:42 +0800367{
368 struct inode *const inode = d_inode(path->dentry);
Gao Xiang89f27ed2019-05-28 11:19:42 +0800369
Gao Xianga5876e22019-09-04 10:08:56 +0800370 if (erofs_inode_is_data_compressed(EROFS_I(inode)->datalayout))
Gao Xiang89f27ed2019-05-28 11:19:42 +0800371 stat->attributes |= STATX_ATTR_COMPRESSED;
372
373 stat->attributes |= STATX_ATTR_IMMUTABLE;
374 stat->attributes_mask |= (STATX_ATTR_COMPRESSED |
375 STATX_ATTR_IMMUTABLE);
376
Christian Brauner0d56a452021-01-21 14:19:30 +0100377 generic_fillattr(&init_user_ns, inode, stat);
Gao Xiang89f27ed2019-05-28 11:19:42 +0800378 return 0;
379}
380
Gao Xiang60939822019-01-14 19:40:24 +0800381const struct inode_operations erofs_generic_iops = {
Gao Xiang89f27ed2019-05-28 11:19:42 +0800382 .getattr = erofs_getattr,
Gao Xiangb17500a2018-07-26 20:21:52 +0800383 .listxattr = erofs_listxattr,
Gao Xiang516c115c2019-01-29 16:35:20 +0800384 .get_acl = erofs_get_acl,
Gao Xiangeadcd6b2021-08-13 13:29:31 +0800385 .fiemap = erofs_fiemap,
Gao Xiang60939822019-01-14 19:40:24 +0800386};
387
388const struct inode_operations erofs_symlink_iops = {
389 .get_link = page_get_link,
Gao Xiang89f27ed2019-05-28 11:19:42 +0800390 .getattr = erofs_getattr,
Gao Xiang60939822019-01-14 19:40:24 +0800391 .listxattr = erofs_listxattr,
Gao Xiang516c115c2019-01-29 16:35:20 +0800392 .get_acl = erofs_get_acl,
Gao Xiang60939822019-01-14 19:40:24 +0800393};
394
395const struct inode_operations erofs_fast_symlink_iops = {
396 .get_link = simple_get_link,
Gao Xiang89f27ed2019-05-28 11:19:42 +0800397 .getattr = erofs_getattr,
Gao Xiang60939822019-01-14 19:40:24 +0800398 .listxattr = erofs_listxattr,
Gao Xiang516c115c2019-01-29 16:35:20 +0800399 .get_acl = erofs_get_acl,
Gao Xiang60939822019-01-14 19:40:24 +0800400};