tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.acl head: 016a469fef396cd7e7143c8692043f25fc3a0ae2 commit: 9582ceaf8b5fc27a82803f2e6db5edca751928a2 [8/9] posix_acl: Inode acl caching fixes config: m68k-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9582ceaf8b5fc27a82803f2e6db5edca751928a2 # save the attached .config to linux build tree make.cross ARCH=m68k All warnings (new ones prefixed by >>): In file included from arch/m68k/include/asm/atomic.h:6:0, from include/linux/atomic.h:4, from include/linux/spinlock.h:406, from include/linux/wait.h:8, from include/linux/fs.h:5, from fs/nfs/nfs3acl.c:1: fs/nfs/nfs3acl.c: In function 'nfs3_abort_get_acl': arch/m68k/include/asm/cmpxchg.h:121:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \ ^ >> fs/nfs/nfs3acl.c:43:2: note: in expansion of macro 'cmpxchg' cmpxchg(p, sentinel, ACL_NOT_CACHED); ^ -- In file included from arch/m68k/include/asm/atomic.h:6:0, from include/linux/atomic.h:4, from include/linux/spinlock.h:406, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/slab.h:14, from fs/posix_acl.c:14: fs/posix_acl.c: In function 'get_acl': arch/m68k/include/asm/cmpxchg.h:121:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \ ^ >> fs/posix_acl.c:147:3: note: in expansion of macro 'cmpxchg' cmpxchg(p, sentinel, ACL_NOT_CACHED); ^ vim +/cmpxchg +43 fs/nfs/nfs3acl.c > 1 #include <linux/fs.h> 2 #include <linux/gfp.h> 3 #include <linux/nfs.h> 4 #include <linux/nfs3.h> 5 #include <linux/nfs_fs.h> 6 #include <linux/posix_acl_xattr.h> 7 #include <linux/nfsacl.h> 8 9 #include "internal.h" 10 #include "nfs3_fs.h" 11 12 #define NFSDBG_FACILITY NFSDBG_PROC 13 14 /* 15 * nfs3_prepare_get_acl, nfs3_complete_get_acl, nfs3_abort_get_acl: Helpers for 16 * caching get_acl results in a race-free way. See fs/posix_acl.c:get_acl() 17 * for explanations. 18 */ 19 static void nfs3_prepare_get_acl(struct posix_acl **p) 20 { 21 struct posix_acl *sentinel = uncached_acl_sentinel(current); 22 23 if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) { 24 /* Not the first reader or sentinel already in place. */ 25 } 26 } 27 28 static void nfs3_complete_get_acl(struct posix_acl **p, struct posix_acl *acl) 29 { 30 struct posix_acl *sentinel = uncached_acl_sentinel(current); 31 32 /* Only cache the ACL if our sentinel is still in place. */ 33 posix_acl_dup(acl); 34 if (cmpxchg(p, sentinel, acl) != sentinel) 35 posix_acl_release(acl); 36 } 37 38 static void nfs3_abort_get_acl(struct posix_acl **p) 39 { 40 struct posix_acl *sentinel = uncached_acl_sentinel(current); 41 42 /* Remove our sentinel upon failure. */ > 43 cmpxchg(p, sentinel, ACL_NOT_CACHED); 44 } 45 46 struct posix_acl *nfs3_get_acl(struct inode *inode, int type) --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data