From: kernel test robot <lkp@intel.com>
To: Andrea Gelmini <andrea.gelmini@gelma.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [koverstreet-bcachefs:pr/739 1/1] fs/bcachefs/acl.c:139:8: error: use of undeclared identifier 'PF_MEMALLOC_NORECLAIM'
Date: Sat, 8 Feb 2025 06:49:52 +0800 [thread overview]
Message-ID: <202502080640.Ckh5y7qa-lkp@intel.com> (raw)
tree: https://github.com/koverstreet/bcachefs pr/739
head: 8fd3bb46913c536490fe0c180ce57dc1c0d630ba
commit: 8fd3bb46913c536490fe0c180ce57dc1c0d630ba [1/1] Fix typos
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250208/202502080640.Ckh5y7qa-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502080640.Ckh5y7qa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502080640.Ckh5y7qa-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from fs/bcachefs/acl.c:3:
In file included from fs/bcachefs/bcachefs.h:188:
In file included from include/linux/bio.h:10:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:10:
In file included from include/linux/mm.h:2224:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> fs/bcachefs/acl.c:139:8: error: use of undeclared identifier 'PF_MEMALLOC_NORECLAIM'
139 | acl = allocate_dropping_locks(trans, ret,
| ^
fs/bcachefs/btree_iter.h:900:37: note: expanded from macro 'allocate_dropping_locks'
900 | typeof(_do) _p = memalloc_flags_do(PF_MEMALLOC_NORECLAIM|PF_MEMALLOC_NOWARN, _do);\
| ^
>> fs/bcachefs/acl.c:139:8: error: use of undeclared identifier 'PF_MEMALLOC_NOWARN'
fs/bcachefs/btree_iter.h:900:59: note: expanded from macro 'allocate_dropping_locks'
900 | typeof(_do) _p = memalloc_flags_do(PF_MEMALLOC_NORECLAIM|PF_MEMALLOC_NOWARN, _do);\
| ^
fs/bcachefs/acl.c:425:8: error: use of undeclared identifier 'PF_MEMALLOC_NORECLAIM'
425 | ret = allocate_dropping_locks_errcode(trans,
| ^
fs/bcachefs/btree_iter.h:890:31: note: expanded from macro 'allocate_dropping_locks_errcode'
890 | int _ret = memalloc_flags_do(PF_MEMALLOC_NORECLAIM|PF_MEMALLOC_NOWARN, _do);\
| ^
fs/bcachefs/acl.c:425:8: error: use of undeclared identifier 'PF_MEMALLOC_NOWARN'
fs/bcachefs/btree_iter.h:890:53: note: expanded from macro 'allocate_dropping_locks_errcode'
890 | int _ret = memalloc_flags_do(PF_MEMALLOC_NORECLAIM|PF_MEMALLOC_NOWARN, _do);\
| ^
3 warnings and 4 errors generated.
vim +/PF_MEMALLOC_NORECLAIM +139 fs/bcachefs/acl.c
1c6fdbd8f2465d Kent Overstreet 2017-03-16 87
1c6fdbd8f2465d Kent Overstreet 2017-03-16 88 /*
1c6fdbd8f2465d Kent Overstreet 2017-03-16 89 * Convert from filesystem to in-memory representation.
1c6fdbd8f2465d Kent Overstreet 2017-03-16 90 */
5ff10c0a04c421 Kent Overstreet 2023-05-28 91 static struct posix_acl *bch2_acl_from_disk(struct btree_trans *trans,
5ff10c0a04c421 Kent Overstreet 2023-05-28 92 const void *value, size_t size)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 93 {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 94 const void *p, *end = value + size;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 95 struct posix_acl *acl;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 96 struct posix_acl_entry *out;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 97 unsigned count = 0;
5ff10c0a04c421 Kent Overstreet 2023-05-28 98 int ret;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 99
1c6fdbd8f2465d Kent Overstreet 2017-03-16 100 if (!value)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 101 return NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 102 if (size < sizeof(bch_acl_header))
1c6fdbd8f2465d Kent Overstreet 2017-03-16 103 goto invalid;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 104 if (((bch_acl_header *)value)->a_version !=
1c6fdbd8f2465d Kent Overstreet 2017-03-16 105 cpu_to_le32(BCH_ACL_VERSION))
1c6fdbd8f2465d Kent Overstreet 2017-03-16 106 goto invalid;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 107
1c6fdbd8f2465d Kent Overstreet 2017-03-16 108 p = value + sizeof(bch_acl_header);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 109 while (p < end) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 110 const bch_acl_entry *entry = p;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 111
1c6fdbd8f2465d Kent Overstreet 2017-03-16 112 if (p + sizeof(bch_acl_entry_short) > end)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 113 goto invalid;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 114
1c6fdbd8f2465d Kent Overstreet 2017-03-16 115 switch (le16_to_cpu(entry->e_tag)) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 116 case ACL_USER_OBJ:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 117 case ACL_GROUP_OBJ:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 118 case ACL_MASK:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 119 case ACL_OTHER:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 120 p += sizeof(bch_acl_entry_short);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 121 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 122 case ACL_USER:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 123 case ACL_GROUP:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 124 p += sizeof(bch_acl_entry);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 125 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 126 default:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 127 goto invalid;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 128 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 129
1c6fdbd8f2465d Kent Overstreet 2017-03-16 130 count++;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 131 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 132
1c6fdbd8f2465d Kent Overstreet 2017-03-16 133 if (p > end)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 134 goto invalid;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 135
1c6fdbd8f2465d Kent Overstreet 2017-03-16 136 if (!count)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 137 return NULL;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 138
5ff10c0a04c421 Kent Overstreet 2023-05-28 @139 acl = allocate_dropping_locks(trans, ret,
8fd3bb46913c53 Andrea Gelmini 2024-12-22 140 posix_acl_alloc(count, GFP_KERNEL));
1c6fdbd8f2465d Kent Overstreet 2017-03-16 141 if (!acl)
1c6fdbd8f2465d Kent Overstreet 2017-03-16 142 return ERR_PTR(-ENOMEM);
5ff10c0a04c421 Kent Overstreet 2023-05-28 143 if (ret) {
5ff10c0a04c421 Kent Overstreet 2023-05-28 144 kfree(acl);
5ff10c0a04c421 Kent Overstreet 2023-05-28 145 return ERR_PTR(ret);
5ff10c0a04c421 Kent Overstreet 2023-05-28 146 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 147
1c6fdbd8f2465d Kent Overstreet 2017-03-16 148 out = acl->a_entries;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 149
1c6fdbd8f2465d Kent Overstreet 2017-03-16 150 p = value + sizeof(bch_acl_header);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 151 while (p < end) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 152 const bch_acl_entry *in = p;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 153
1c6fdbd8f2465d Kent Overstreet 2017-03-16 154 out->e_tag = le16_to_cpu(in->e_tag);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 155 out->e_perm = le16_to_cpu(in->e_perm);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 156
1c6fdbd8f2465d Kent Overstreet 2017-03-16 157 switch (out->e_tag) {
1c6fdbd8f2465d Kent Overstreet 2017-03-16 158 case ACL_USER_OBJ:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 159 case ACL_GROUP_OBJ:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 160 case ACL_MASK:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 161 case ACL_OTHER:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 162 p += sizeof(bch_acl_entry_short);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 163 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 164 case ACL_USER:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 165 out->e_uid = make_kuid(&init_user_ns,
1c6fdbd8f2465d Kent Overstreet 2017-03-16 166 le32_to_cpu(in->e_id));
1c6fdbd8f2465d Kent Overstreet 2017-03-16 167 p += sizeof(bch_acl_entry);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 168 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 169 case ACL_GROUP:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 170 out->e_gid = make_kgid(&init_user_ns,
1c6fdbd8f2465d Kent Overstreet 2017-03-16 171 le32_to_cpu(in->e_id));
1c6fdbd8f2465d Kent Overstreet 2017-03-16 172 p += sizeof(bch_acl_entry);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 173 break;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 174 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 175
1c6fdbd8f2465d Kent Overstreet 2017-03-16 176 out++;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 177 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 178
1c6fdbd8f2465d Kent Overstreet 2017-03-16 179 BUG_ON(out != acl->a_entries + acl->a_count);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 180
1c6fdbd8f2465d Kent Overstreet 2017-03-16 181 return acl;
1c6fdbd8f2465d Kent Overstreet 2017-03-16 182 invalid:
1c6fdbd8f2465d Kent Overstreet 2017-03-16 183 pr_err("invalid acl entry");
1c6fdbd8f2465d Kent Overstreet 2017-03-16 184 return ERR_PTR(-EINVAL);
1c6fdbd8f2465d Kent Overstreet 2017-03-16 185 }
1c6fdbd8f2465d Kent Overstreet 2017-03-16 186
:::::: The code at line 139 was first introduced by commit
:::::: 5ff10c0a04c4217b24997d9b127c50602d717ab3 bcachefs: Convert acl.c to allocate_dropping_locks()
:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-02-07 22:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 22:49 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-02 10:05 [koverstreet-bcachefs:pr/739 1/1] fs/bcachefs/acl.c:139:8: error: use of undeclared identifier 'PF_MEMALLOC_NORECLAIM' kernel test robot
2024-12-10 16:49 kernel test robot
2024-11-17 1:38 kernel test robot
2024-10-19 4:56 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502080640.Ckh5y7qa-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrea.gelmini@gelma.net \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.