Re: [ceph-client:testing 3/3] fs//ceph/acl.c:104:32: error: invalid initializer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hmmmm, fs.h in testing-tree is behind linus-tree.

Should I change to ‘timespec’ for building?

Thanks,
Chengguang.


> 在 2018年6月22日,下午5:03,kbuild test robot <lkp@xxxxxxxxx> 写道:
> 
> tree:   https://github.com/ceph/ceph-client.git testing
> head:   d61e20b0016b1c3a75e7997adafa9db1683b6557
> commit: d61e20b0016b1c3a75e7997adafa9db1683b6557 [3/3] ceph: restore ctime as well in the case of restoring old mode
> config: xtensa-allyesconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 8.1.0
> reproduce:
>        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>        chmod +x ~/bin/make.cross
>        git checkout d61e20b0016b1c3a75e7997adafa9db1683b6557
>        # save the attached .config to linux build tree
>        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 
> 
> All errors (new ones prefixed by >>):
> 
>   fs//ceph/acl.c: In function 'ceph_set_acl':
>>> fs//ceph/acl.c:104:32: error: invalid initializer
>     struct timespec64 old_ctime = inode->i_ctime;
>                                   ^~~~~
>>> fs//ceph/acl.c:158:22: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
>       newattrs.ia_ctime = old_ctime;
>                         ^
> 
> vim +104 fs//ceph/acl.c
> 
>    97	
>    98	int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
>    99	{
>   100		int ret = 0, size = 0;
>   101		const char *name = NULL;
>   102		char *value = NULL;
>   103		struct iattr newattrs;
>> 104		struct timespec64 old_ctime = inode->i_ctime;
>   105		umode_t new_mode = inode->i_mode, old_mode = inode->i_mode;
>   106	
>   107		switch (type) {
>   108		case ACL_TYPE_ACCESS:
>   109			name = XATTR_NAME_POSIX_ACL_ACCESS;
>   110			if (acl) {
>   111				ret = posix_acl_update_mode(inode, &new_mode, &acl);
>   112				if (ret)
>   113					goto out;
>   114			}
>   115			break;
>   116		case ACL_TYPE_DEFAULT:
>   117			if (!S_ISDIR(inode->i_mode)) {
>   118				ret = acl ? -EINVAL : 0;
>   119				goto out;
>   120			}
>   121			name = XATTR_NAME_POSIX_ACL_DEFAULT;
>   122			break;
>   123		default:
>   124			ret = -EINVAL;
>   125			goto out;
>   126		}
>   127	
>   128		if (acl) {
>   129			size = posix_acl_xattr_size(acl->a_count);
>   130			value = kmalloc(size, GFP_NOFS);
>   131			if (!value) {
>   132				ret = -ENOMEM;
>   133				goto out;
>   134			}
>   135	
>   136			ret = posix_acl_to_xattr(&init_user_ns, acl, value, size);
>   137			if (ret < 0)
>   138				goto out_free;
>   139		}
>   140	
>   141		if (ceph_snap(inode) != CEPH_NOSNAP) {
>   142			ret = -EROFS;
>   143			goto out_free;
>   144		}
>   145	
>   146		if (new_mode != old_mode) {
>   147			newattrs.ia_ctime = current_time(inode);
>   148			newattrs.ia_mode = new_mode;
>   149			newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
>   150			ret = __ceph_setattr(inode, &newattrs);
>   151			if (ret)
>   152				goto out_free;
>   153		}
>   154	
>   155		ret = __ceph_setxattr(inode, name, value, size, 0);
>   156		if (ret) {
>   157			if (new_mode != old_mode) {
>> 158				newattrs.ia_ctime = old_ctime;
>   159				newattrs.ia_mode = old_mode;
>   160				newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
>   161				__ceph_setattr(inode, &newattrs);
>   162			}
>   163			goto out_free;
>   164		}
>   165	
>   166		ceph_set_cached_acl(inode, type, acl);
>   167	
>   168	out_free:
>   169		kfree(value);
>   170	out:
>   171		return ret;
>   172	}
>   173	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> <.config.gz>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux