/Linux-v5.4/fs/ |
D | attr.c | 64 unsigned int ia_valid = attr->ia_valid; in setattr_prepare() local 70 if (ia_valid & ATTR_SIZE) { in setattr_prepare() 77 if (ia_valid & ATTR_FORCE) in setattr_prepare() 81 if ((ia_valid & ATTR_UID) && !chown_ok(inode, attr->ia_uid)) in setattr_prepare() 85 if ((ia_valid & ATTR_GID) && !chgrp_ok(inode, attr->ia_gid)) in setattr_prepare() 89 if (ia_valid & ATTR_MODE) { in setattr_prepare() 93 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : in setattr_prepare() 100 if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)) { in setattr_prepare() 107 if (ia_valid & ATTR_KILL_PRIV) { in setattr_prepare() 180 unsigned int ia_valid = attr->ia_valid; in setattr_copy() local [all …]
|
D | utimes.c | 34 newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME; in utimes_common() 37 newattrs.ia_valid &= ~ATTR_ATIME; in utimes_common() 40 newattrs.ia_valid |= ATTR_ATIME_SET; in utimes_common() 44 newattrs.ia_valid &= ~ATTR_MTIME; in utimes_common() 47 newattrs.ia_valid |= ATTR_MTIME_SET; in utimes_common() 54 newattrs.ia_valid |= ATTR_TIMES_SET; in utimes_common() 56 newattrs.ia_valid |= ATTR_TOUCH; in utimes_common()
|
/Linux-v5.4/fs/fat/ |
D | file.c | 66 ia.ia_valid = ATTR_MODE | ATTR_CTIME; in fat_ioctl_set_attributes() 102 fsnotify_change(file->f_path.dentry, ia.ia_valid); in fat_ioctl_set_attributes() 484 unsigned int ia_valid; in fat_setattr() local 488 ia_valid = attr->ia_valid; in fat_setattr() 489 if (ia_valid & TIMES_SET_FLAGS) { in fat_setattr() 491 attr->ia_valid &= ~TIMES_SET_FLAGS; in fat_setattr() 495 attr->ia_valid = ia_valid; in fat_setattr() 508 if (attr->ia_valid & ATTR_SIZE) { in fat_setattr() 513 if (error || attr->ia_valid == ATTR_SIZE) in fat_setattr() 515 attr->ia_valid &= ~ATTR_SIZE; in fat_setattr() [all …]
|
/Linux-v5.4/fs/configfs/ |
D | inode.c | 48 unsigned int ia_valid = iattr->ia_valid; in configfs_setattr() local 74 if (ia_valid & ATTR_UID) in configfs_setattr() 76 if (ia_valid & ATTR_GID) in configfs_setattr() 78 if (ia_valid & ATTR_ATIME) in configfs_setattr() 81 if (ia_valid & ATTR_MTIME) in configfs_setattr() 84 if (ia_valid & ATTR_CTIME) in configfs_setattr() 87 if (ia_valid & ATTR_MODE) { in configfs_setattr()
|
/Linux-v5.4/fs/adfs/ |
D | inode.c | 298 unsigned int ia_valid = attr->ia_valid; in adfs_notify_change() local 307 if ((ia_valid & ATTR_UID && !uid_eq(attr->ia_uid, ADFS_SB(sb)->s_uid)) || in adfs_notify_change() 308 (ia_valid & ATTR_GID && !gid_eq(attr->ia_gid, ADFS_SB(sb)->s_gid))) in adfs_notify_change() 315 if (ia_valid & ATTR_SIZE) in adfs_notify_change() 318 if (ia_valid & ATTR_MTIME) { in adfs_notify_change() 326 if (ia_valid & ATTR_ATIME) in adfs_notify_change() 328 if (ia_valid & ATTR_CTIME) in adfs_notify_change() 330 if (ia_valid & ATTR_MODE) { in adfs_notify_change() 339 if (ia_valid & (ATTR_SIZE | ATTR_MTIME | ATTR_MODE)) in adfs_notify_change()
|
/Linux-v5.4/fs/hostfs/ |
D | hostfs_kern.c | 802 attr->ia_valid &= ~ATTR_SIZE; in hostfs_setattr() 804 attrs.ia_valid = 0; in hostfs_setattr() 805 if (attr->ia_valid & ATTR_MODE) { in hostfs_setattr() 806 attrs.ia_valid |= HOSTFS_ATTR_MODE; in hostfs_setattr() 809 if (attr->ia_valid & ATTR_UID) { in hostfs_setattr() 810 attrs.ia_valid |= HOSTFS_ATTR_UID; in hostfs_setattr() 813 if (attr->ia_valid & ATTR_GID) { in hostfs_setattr() 814 attrs.ia_valid |= HOSTFS_ATTR_GID; in hostfs_setattr() 817 if (attr->ia_valid & ATTR_SIZE) { in hostfs_setattr() 818 attrs.ia_valid |= HOSTFS_ATTR_SIZE; in hostfs_setattr() [all …]
|
D | hostfs_user.c | 200 if (attrs->ia_valid & HOSTFS_ATTR_MODE) { in set_attr() 208 if (attrs->ia_valid & HOSTFS_ATTR_UID) { in set_attr() 216 if (attrs->ia_valid & HOSTFS_ATTR_GID) { in set_attr() 224 if (attrs->ia_valid & HOSTFS_ATTR_SIZE) { in set_attr() 239 if (attrs->ia_valid & ma) { in set_attr() 249 if (attrs->ia_valid & HOSTFS_ATTR_ATIME_SET) { in set_attr() 253 if (attrs->ia_valid & HOSTFS_ATTR_MTIME_SET) { in set_attr() 267 if (attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)) { in set_attr()
|
/Linux-v5.4/include/linux/ |
D | fsnotify.h | 312 static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) in fsnotify_change() argument 317 if (ia_valid & ATTR_UID) in fsnotify_change() 319 if (ia_valid & ATTR_GID) in fsnotify_change() 321 if (ia_valid & ATTR_SIZE) in fsnotify_change() 325 if ((ia_valid & (ATTR_ATIME | ATTR_MTIME)) == (ATTR_ATIME | ATTR_MTIME)) in fsnotify_change() 327 else if (ia_valid & ATTR_ATIME) in fsnotify_change() 329 else if (ia_valid & ATTR_MTIME) in fsnotify_change() 332 if (ia_valid & ATTR_MODE) in fsnotify_change()
|
D | evm.h | 25 extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid); 69 static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid) in evm_inode_post_setattr() argument
|
/Linux-v5.4/fs/kernfs/ |
D | inode.c | 75 unsigned int ia_valid = iattr->ia_valid; in __kernfs_setattr() local 81 if (ia_valid & ATTR_UID) in __kernfs_setattr() 83 if (ia_valid & ATTR_GID) in __kernfs_setattr() 85 if (ia_valid & ATTR_ATIME) in __kernfs_setattr() 87 if (ia_valid & ATTR_MTIME) in __kernfs_setattr() 89 if (ia_valid & ATTR_CTIME) in __kernfs_setattr() 91 if (ia_valid & ATTR_MODE) in __kernfs_setattr()
|
/Linux-v5.4/fs/ramfs/ |
D | file-nommu.c | 164 unsigned int old_ia_valid = ia->ia_valid; in ramfs_nommu_setattr() 173 if (ia->ia_valid & ATTR_SIZE) { in ramfs_nommu_setattr() 178 if (ret < 0 || ia->ia_valid == ATTR_SIZE) in ramfs_nommu_setattr() 184 ia->ia_valid |= ATTR_MTIME|ATTR_CTIME; in ramfs_nommu_setattr() 190 ia->ia_valid = old_ia_valid; in ramfs_nommu_setattr()
|
/Linux-v5.4/fs/jfs/ |
D | file.c | 102 if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) || in jfs_setattr() 103 (iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid))) { in jfs_setattr() 109 if ((iattr->ia_valid & ATTR_SIZE) && in jfs_setattr() 124 if (iattr->ia_valid & ATTR_MODE) in jfs_setattr()
|
/Linux-v5.4/fs/nfsd/ |
D | nfsproc.c | 71 argp->attrs.ia_valid, (long) argp->attrs.ia_size); in nfsd_proc_setattr() 88 if ((iap->ia_valid & BOTH_TIME_SET) == BOTH_TIME_SET && in nfsd_proc_setattr() 112 iap->ia_valid &= ~BOTH_TIME_SET; in nfsd_proc_setattr() 302 if (attr->ia_valid & ATTR_MODE) { in nfsd_proc_create() 315 attr->ia_valid |= ATTR_SIZE; in nfsd_proc_create() 342 attr->ia_valid |= ATTR_MODE; in nfsd_proc_create() 351 } else if (type == S_IFCHR && !(attr->ia_valid & ATTR_SIZE)) { in nfsd_proc_create() 361 attr->ia_valid &= ~ATTR_SIZE; in nfsd_proc_create() 376 argp->name, attr->ia_valid, (long) attr->ia_size); in nfsd_proc_create() 381 attr->ia_valid &= ATTR_SIZE; in nfsd_proc_create() [all …]
|
D | vfs.c | 304 if (iap->ia_valid & ATTR_MODE) { in nfsd_sanitize_attrs() 311 ((iap->ia_valid & ATTR_UID) || (iap->ia_valid & ATTR_GID))) { in nfsd_sanitize_attrs() 312 iap->ia_valid |= ATTR_KILL_PRIV; in nfsd_sanitize_attrs() 313 if (iap->ia_valid & ATTR_MODE) { in nfsd_sanitize_attrs() 320 iap->ia_valid |= (ATTR_KILL_SUID | ATTR_KILL_SGID); in nfsd_sanitize_attrs() 370 bool size_change = (iap->ia_valid & ATTR_SIZE); in nfsd_setattr() 372 if (iap->ia_valid & ATTR_SIZE) { in nfsd_setattr() 384 if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME)) { in nfsd_setattr() 386 if (!(iap->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET))) in nfsd_setattr() 408 iap->ia_valid &= ~ATTR_MODE; in nfsd_setattr() [all …]
|
D | nfsxdr.c | 78 iap->ia_valid = 0; in decode_sattr() 85 iap->ia_valid |= ATTR_MODE; in decode_sattr() 91 iap->ia_valid |= ATTR_UID; in decode_sattr() 96 iap->ia_valid |= ATTR_GID; in decode_sattr() 99 iap->ia_valid |= ATTR_SIZE; in decode_sattr() 104 iap->ia_valid |= ATTR_ATIME | ATTR_ATIME_SET; in decode_sattr() 110 iap->ia_valid |= ATTR_MTIME | ATTR_MTIME_SET; in decode_sattr() 123 iap->ia_valid &= ~(ATTR_ATIME_SET|ATTR_MTIME_SET); in decode_sattr()
|
/Linux-v5.4/fs/cifs/ |
D | inode.c | 1153 if (attrs->ia_valid & ATTR_ATIME) { 1160 if (attrs->ia_valid & ATTR_MTIME) { 1173 if (set_time && (attrs->ia_valid & ATTR_CTIME)) { 2284 direntry, attrs->ia_valid); 2289 attrs->ia_valid |= ATTR_FORCE; 2321 if (attrs->ia_valid & ATTR_SIZE) { 2328 if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) 2329 attrs->ia_valid &= ~ATTR_MODE; 2338 if (attrs->ia_valid & ATTR_MODE) 2343 if (attrs->ia_valid & ATTR_UID) [all …]
|
/Linux-v5.4/fs/ecryptfs/ |
D | inode.c | 736 lower_ia->ia_valid &= ~ATTR_SIZE; in truncate_upper() 747 lower_ia->ia_valid &= ~ATTR_SIZE; in truncate_upper() 765 lower_ia->ia_valid |= ATTR_SIZE; in truncate_upper() 802 lower_ia->ia_valid |= ATTR_SIZE; in truncate_upper() 804 lower_ia->ia_valid &= ~ATTR_SIZE; in truncate_upper() 845 struct iattr ia = { .ia_valid = ATTR_SIZE, .ia_size = new_length }; in ecryptfs_truncate() 846 struct iattr lower_ia = { .ia_valid = 0 }; in ecryptfs_truncate() 854 if (!rc && lower_ia.ia_valid & ATTR_SIZE) { in ecryptfs_truncate() 939 if (ia->ia_valid & ATTR_SIZE) { in ecryptfs_setattr() 946 if (ia->ia_valid & ATTR_FILE) in ecryptfs_setattr() [all …]
|
/Linux-v5.4/security/integrity/evm/ |
D | evm_main.c | 475 unsigned int ia_valid = attr->ia_valid; in evm_inode_setattr() local 484 if (!(ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID))) in evm_inode_setattr() 507 void evm_inode_post_setattr(struct dentry *dentry, int ia_valid) in evm_inode_post_setattr() argument 512 if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) in evm_inode_post_setattr()
|
/Linux-v5.4/fs/udf/ |
D | file.c | 267 if ((attr->ia_valid & ATTR_UID) && in udf_setattr() 271 if ((attr->ia_valid & ATTR_GID) && in udf_setattr() 276 if ((attr->ia_valid & ATTR_SIZE) && in udf_setattr() 283 if (attr->ia_valid & ATTR_MODE) in udf_setattr()
|
/Linux-v5.4/fs/xfs/ |
D | xfs_iops.c | 586 if (iattr->ia_valid & ATTR_ATIME) in xfs_setattr_time() 588 if (iattr->ia_valid & ATTR_CTIME) in xfs_setattr_time() 590 if (iattr->ia_valid & ATTR_MTIME) in xfs_setattr_time() 624 int mask = iattr->ia_valid; in xfs_setattr_nonsize() 841 ASSERT((iattr->ia_valid & (ATTR_UID|ATTR_GID|ATTR_ATIME|ATTR_ATIME_SET| in xfs_setattr_size() 851 if (!(iattr->ia_valid & (ATTR_CTIME|ATTR_MTIME))) in xfs_setattr_size() 857 iattr->ia_valid &= ~ATTR_SIZE; in xfs_setattr_size() 953 !(iattr->ia_valid & (ATTR_CTIME | ATTR_MTIME))) { in xfs_setattr_size() 956 iattr->ia_valid |= ATTR_CTIME | ATTR_MTIME; in xfs_setattr_size() 992 if (iattr->ia_valid & ATTR_MODE) in xfs_setattr_size() [all …]
|
/Linux-v5.4/fs/affs/ |
D | inode.c | 224 pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid); in affs_notify_change() 230 if (((attr->ia_valid & ATTR_UID) && in affs_notify_change() 232 ((attr->ia_valid & ATTR_GID) && in affs_notify_change() 234 ((attr->ia_valid & ATTR_MODE) && in affs_notify_change() 242 if ((attr->ia_valid & ATTR_SIZE) && in affs_notify_change() 255 if (attr->ia_valid & ATTR_MODE) in affs_notify_change()
|
/Linux-v5.4/fs/orangefs/ |
D | namei.c | 86 iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; in orangefs_create() 211 iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; in orangefs_unlink() 297 iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; in orangefs_symlink() 367 iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; in orangefs_mkdir() 393 iattr.ia_valid |= ATTR_MTIME | ATTR_CTIME; in orangefs_rename()
|
/Linux-v5.4/fs/fuse/ |
D | dir.c | 1353 unsigned ivalid = iattr->ia_valid; in iattr_to_fattr() 1496 attr->ia_valid |= ATTR_FORCE; in fuse_do_setattr() 1502 if (attr->ia_valid & ATTR_OPEN) { in fuse_do_setattr() 1504 WARN_ON(!(attr->ia_valid & ATTR_SIZE)); in fuse_do_setattr() 1519 if (attr->ia_valid & ATTR_SIZE) { in fuse_do_setattr() 1527 attr->ia_valid & in fuse_do_setattr() 1542 attr->ia_valid |= ATTR_MTIME | ATTR_CTIME; in fuse_do_setattr() 1553 if (attr->ia_valid & ATTR_SIZE) { in fuse_do_setattr() 1575 if (attr->ia_valid & ATTR_MTIME) in fuse_do_setattr() 1577 if (attr->ia_valid & ATTR_CTIME) in fuse_do_setattr() [all …]
|
/Linux-v5.4/fs/ubifs/ |
D | file.c | 1077 if (attr->ia_valid & ATTR_UID) in do_attr_changes() 1079 if (attr->ia_valid & ATTR_GID) in do_attr_changes() 1081 if (attr->ia_valid & ATTR_ATIME) { in do_attr_changes() 1085 if (attr->ia_valid & ATTR_MTIME) { in do_attr_changes() 1089 if (attr->ia_valid & ATTR_CTIME) { in do_attr_changes() 1093 if (attr->ia_valid & ATTR_MODE) { in do_attr_changes() 1231 if (attr->ia_valid & ATTR_SIZE) { in do_setattr() 1237 if (attr->ia_valid & ATTR_SIZE) { in do_setattr() 1247 if (attr->ia_valid & ATTR_SIZE) in do_setattr() 1271 inode->i_ino, inode->i_mode, attr->ia_valid); in ubifs_setattr() [all …]
|
/Linux-v5.4/fs/nfs/ |
D | nfs2xdr.c | 347 if (attr->ia_valid & ATTR_MODE) in encode_sattr() 351 if (attr->ia_valid & ATTR_UID) in encode_sattr() 355 if (attr->ia_valid & ATTR_GID) in encode_sattr() 359 if (attr->ia_valid & ATTR_SIZE) in encode_sattr() 364 if (attr->ia_valid & ATTR_ATIME_SET) { in encode_sattr() 367 } else if (attr->ia_valid & ATTR_ATIME) { in encode_sattr() 372 if (attr->ia_valid & ATTR_MTIME_SET) { in encode_sattr() 375 } else if (attr->ia_valid & ATTR_MTIME) { in encode_sattr()
|