CC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Gao Xiang <[email protected]>

Hi Gao,

I love your patch! Perhaps something to improve:

[auto build test WARNING on xiang-erofs/dev-test]
[cannot apply to v5.16 next-20220110]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Gao-Xiang/erofs-get-rid-of-erofs_get_meta_page/20220102-120057
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: i386-randconfig-c001-20220105 
(https://download.01.org/0day-ci/archive/20220111/[email protected]/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://github.com/0day-ci/linux/commit/d7c5cceeea80de5a2a1b177d4952b9802a97edc0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Gao-Xiang/erofs-get-rid-of-erofs_get_meta_page/20220102-120057
        git checkout d7c5cceeea80de5a2a1b177d4952b9802a97edc0
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
           ^
   mm/page_alloc.c:8373:2: note: Loop condition is true.  Entering loop body
           for_each_zone(zone) {
           ^
   include/linux/mmzone.h:1122:2: note: expanded from macro 'for_each_zone'
           for (zone = (first_online_pgdat())->node_zones; \
           ^
   mm/page_alloc.c:8376:3: note: Loop condition is false.  Exiting loop
                   spin_lock_irqsave(&zone->lock, flags);
                   ^
   include/linux/spinlock.h:379:2: note: expanded from macro 'spin_lock_irqsave'
           raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
           ^
   include/linux/spinlock.h:240:2: note: expanded from macro 
'raw_spin_lock_irqsave'
           do {                                            \
           ^
   mm/page_alloc.c:8376:3: note: Loop condition is false.  Exiting loop
                   spin_lock_irqsave(&zone->lock, flags);
                   ^
   include/linux/spinlock.h:377:43: note: expanded from macro 
'spin_lock_irqsave'
   #define spin_lock_irqsave(lock, flags)                          \
                                                                   ^
   mm/page_alloc.c:8378:3: note: The value 0 is assigned to '__base'
                   do_div(tmp, lowmem_pages);
                   ^
   arch/x86/include/asm/div64.h:25:2: note: expanded from macro 'do_div'
           __base = (base);                                        \
           ^~~~~~~~~~~~~~~
   mm/page_alloc.c:8378:3: note: Left side of '&&' is false
                   do_div(tmp, lowmem_pages);
                   ^
   arch/x86/include/asm/div64.h:26:35: note: expanded from macro 'do_div'
           if (__builtin_constant_p(__base) && is_power_of_2(__base)) { \
                                            ^
   mm/page_alloc.c:8378:3: note: Assuming '__high' is not equal to 0
                   do_div(tmp, lowmem_pages);
                   ^
   arch/x86/include/asm/div64.h:32:7: note: expanded from macro 'do_div'
                   if (__high) {                                   \
                       ^~~~~~
   mm/page_alloc.c:8378:3: note: Taking true branch
                   do_div(tmp, lowmem_pages);
                   ^
   arch/x86/include/asm/div64.h:32:3: note: expanded from macro 'do_div'
                   if (__high) {                                   \
                   ^
   mm/page_alloc.c:8378:3: note: Division by zero
                   do_div(tmp, lowmem_pages);
                   ^
   arch/x86/include/asm/div64.h:33:21: note: expanded from macro 'do_div'
                           __upper = __high % (__base);            \
                                     ~~~~~~~^~~~~~~~~~
   Suppressed 8 warnings (7 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (4 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
>> fs/erofs/xattr.c:204:10: warning: Dereference of null pointer 
>> [clang-analyzer-core.NullDereference]
           entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);
                   ^
   fs/erofs/xattr.c:628:6: note: Assuming 'rcu' is false
           if (rcu)
               ^~~
   fs/erofs/xattr.c:628:2: note: Taking false branch
           if (rcu)
           ^
   fs/erofs/xattr.c:631:2: note: Control jumps to 'case 16384:'  at line 635
           switch (type) {
           ^
   fs/erofs/xattr.c:637:3: note:  Execution continues on line 642
                   break;
                   ^
   fs/erofs/xattr.c:642:7: note: Calling 'erofs_getxattr'
           rc = erofs_getxattr(inode, prefix, "", NULL, 0);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:399:7: note: 'name' is non-null
           if (!name)
                ^~~~
   fs/erofs/xattr.c:399:2: note: Taking false branch
           if (!name)
           ^
   fs/erofs/xattr.c:403:6: note: 'ret' is 0
           if (ret)
               ^~~
   fs/erofs/xattr.c:403:2: note: Taking false branch
           if (ret)
           ^
   fs/erofs/xattr.c:408:14: note: Field 'len' is <= EROFS_NAME_LEN
           if (it.name.len > EROFS_NAME_LEN)
                       ^
   fs/erofs/xattr.c:408:2: note: Taking false branch
           if (it.name.len > EROFS_NAME_LEN)
           ^
   fs/erofs/xattr.c:418:8: note: Calling 'inline_getxattr'
           ret = inline_getxattr(inode, &it);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:343:8: note: Calling 'inline_xattr_iter_begin'
           ret = inline_xattr_iter_begin(&it->it, inode);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:165:6: note: Assuming 'xattr_header_sz' is < field 
'xattr_isize'
           if (xattr_header_sz >= vi->xattr_isize) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:165:2: note: Taking false branch
           if (xattr_header_sz >= vi->xattr_isize) {
           ^
   fs/erofs/xattr.c:177:2: note: Taking false branch
           if (IS_ERR(it->kaddr))
           ^
   fs/erofs/xattr.c:343:8: note: Returning from 'inline_xattr_iter_begin'
           ret = inline_xattr_iter_begin(&it->it, inode);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:344:6: note: 'ret' is >= 0
           if (ret < 0)
               ^~~
   fs/erofs/xattr.c:344:2: note: Taking false branch
           if (ret < 0)
           ^
   fs/erofs/xattr.c:348:2: note: Loop condition is true.  Entering loop body
           while (remaining) {
           ^
   fs/erofs/xattr.c:349:9: note: Calling 'xattr_foreach'
                   ret = xattr_foreach(&it->it, &find_xattr_handlers, 
&remaining);
                         
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:195:8: note: Calling 'xattr_iter_fixup'
           err = xattr_iter_fixup(it);
                 ^~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:145:6: note: Assuming the condition is false
           if (it->ofs < EROFS_BLKSIZ)
               ^~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:145:2: note: Taking false branch
           if (it->ofs < EROFS_BLKSIZ)
           ^
   fs/erofs/xattr.c:149:2: note: Value assigned to 'it.it.kaddr'
           it->kaddr = erofs_read_metabuf(&it->buf, it->sb, it->blkaddr,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:151:6: note: Assuming the condition is true
           if (IS_ERR(it->kaddr))
               ^~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:151:2: note: Taking true branch
           if (IS_ERR(it->kaddr))
           ^
   fs/erofs/xattr.c:152:3: note: Returning value, which participates in a 
condition later
                   return PTR_ERR(it->kaddr);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:195:8: note: Returning from 'xattr_iter_fixup'
           err = xattr_iter_fixup(it);
                 ^~~~~~~~~~~~~~~~~~~~
   fs/erofs/xattr.c:196:6: note: Assuming 'err' is 0
           if (err)
               ^~~
   fs/erofs/xattr.c:196:2: note: Taking false branch
           if (err)
           ^
   fs/erofs/xattr.c:204:10: note: Dereference of null pointer
           entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.

vim +204 fs/erofs/xattr.c

b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  181  
bdf30cef10558d drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  182  
/*
bdf30cef10558d drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  183   
* Regardless of success or failure, `xattr_foreach' will end up with
bdf30cef10558d drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  184   
* `ofs' pointing to the next xattr item rather than an arbitrary position.
bdf30cef10558d drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  185   
*/
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  186  
static int xattr_foreach(struct xattr_iter *it,
447a3621b3835b drivers/staging/erofs/xattr.c Julian Merida    2019-03-18  187   
                 const struct xattr_iter_handlers *op,
447a3621b3835b drivers/staging/erofs/xattr.c Julian Merida    2019-03-18  188   
                 unsigned int *tlimit)
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  189  {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  190   
struct erofs_xattr_entry entry;
7dd68b147d60e5 drivers/staging/erofs/xattr.c Thomas Weißschuh 2018-09-10  191   
unsigned int value_sz, processed, slice;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  192   
int err;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  193  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  194   
/* 0. fixup blkaddr, ofs, ipage */
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  195   
err = xattr_iter_fixup(it);
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  196   
if (err)
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  197   
        return err;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  198  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  199   
/*
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  200   
 * 1. read xattr entry to the memory,
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  201   
 *    since we do EROFS_XATTR_ALIGN
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  202   
 *    therefore entry should be in the page
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  203   
 */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26 @204   
entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);
561fb35a9d04ca drivers/staging/erofs/xattr.c Bhanusree Pola   2019-03-22  205   
if (tlimit) {
b6796abd3cc155 fs/erofs/xattr.c              Gao Xiang        2019-09-04  206   
        unsigned int entry_sz = erofs_xattr_entry_size(&entry);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  207  
9ddc7004f6aae6 drivers/staging/erofs/xattr.c Gao Xiang        2019-08-13  208   
        /* xattr on-disk corruption: xattr entry beyond xattr_isize */
8d8a09b093d707 fs/erofs/xattr.c              Gao Xiang        2019-08-30  209   
        if (*tlimit < entry_sz) {
9ddc7004f6aae6 drivers/staging/erofs/xattr.c Gao Xiang        2019-08-13  210   
                DBG_BUGON(1);
a6b9b1d5eae61a drivers/staging/erofs/xattr.c Gao Xiang        2019-08-14  211   
                return -EFSCORRUPTED;
9ddc7004f6aae6 drivers/staging/erofs/xattr.c Gao Xiang        2019-08-13  212   
        }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  213   
        *tlimit -= entry_sz;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  214   
}
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  215  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  216   
it->ofs += sizeof(struct erofs_xattr_entry);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  217   
value_sz = le16_to_cpu(entry.e_value_size);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  218  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  219   
/* handle entry */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  220   
err = op->entry(it, &entry);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  221   
if (err) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  222   
        it->ofs += entry.e_name_len + value_sz;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  223   
        goto out;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  224   
}
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  225  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  226   
/* 2. handle xattr name (ofs will finally be at the end of name) */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  227   
processed = 0;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  228  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  229   
while (processed < entry.e_name_len) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  230   
        if (it->ofs >= EROFS_BLKSIZ) {
9ddc7004f6aae6 drivers/staging/erofs/xattr.c Gao Xiang        2019-08-13  231   
                DBG_BUGON(it->ofs > EROFS_BLKSIZ);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  232  
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  233   
                err = xattr_iter_fixup(it);
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  234   
                if (err)
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  235   
                        goto out;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  236   
                it->ofs = 0;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  237   
        }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  238  
d7c5cceeea80de fs/erofs/xattr.c              Gao Xiang        2022-01-02  239   
        slice = min_t(unsigned int, EROFS_BLKSIZ - it->ofs,
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  240   
                      entry.e_name_len - processed);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  241  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  242   
        /* handle name */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  243   
        err = op->name(it, processed, it->kaddr + it->ofs, slice);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  244   
        if (err) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  245   
                it->ofs += entry.e_name_len - processed + value_sz;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  246   
                goto out;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  247   
        }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  248  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  249   
        it->ofs += slice;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  250   
        processed += slice;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  251   
}
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  252  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  253   
/* 3. handle xattr value */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  254   
processed = 0;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  255  
561fb35a9d04ca drivers/staging/erofs/xattr.c Bhanusree Pola   2019-03-22  256   
if (op->alloc_buffer) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  257   
        err = op->alloc_buffer(it, value_sz);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  258   
        if (err) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  259   
                it->ofs += value_sz;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  260   
                goto out;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  261   
        }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  262   
}
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  263  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  264   
while (processed < value_sz) {
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  265   
        if (it->ofs >= EROFS_BLKSIZ) {
9ddc7004f6aae6 drivers/staging/erofs/xattr.c Gao Xiang        2019-08-13  266   
                DBG_BUGON(it->ofs > EROFS_BLKSIZ);
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  267  
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  268   
                err = xattr_iter_fixup(it);
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  269   
                if (err)
cadf1ccf1b0021 drivers/staging/erofs/xattr.c Gao Xiang        2018-08-21  270   
                        goto out;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  271   
                it->ofs = 0;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  272   
        }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  273  
d7c5cceeea80de fs/erofs/xattr.c              Gao Xiang        2022-01-02  274   
        slice = min_t(unsigned int, EROFS_BLKSIZ - it->ofs,
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  275   
                      value_sz - processed);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  276   
        op->value(it, processed, it->kaddr + it->ofs, slice);
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  277   
        it->ofs += slice;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  278   
        processed += slice;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  279   
}
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  280  
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  281  
out:
bdf30cef10558d drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  282   
/* xattrs should be 4-byte aligned (on-disk constraint) */
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  283   
it->ofs = EROFS_XATTR_ALIGN(it->ofs);
6614f76530c102 drivers/staging/erofs/xattr.c Gao Xiang        2018-09-19  284   
return err < 0 ? err : 0;
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  285  }
b17500a0fdbae1 drivers/staging/erofs/xattr.c Gao Xiang        2018-07-26  286  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to