• Home
  • Raw
  • Download

Lines Matching refs:attr

251 		if (ret || fuse_invalid_attr(&outarg.attr) ||  in fuse_dentry_revalidate()
252 (outarg.attr.mode ^ inode->i_mode) & S_IFMT) in fuse_dentry_revalidate()
256 fuse_change_attributes(inode, &outarg.attr, in fuse_dentry_revalidate()
323 bool fuse_invalid_attr(struct fuse_attr *attr) in fuse_invalid_attr() argument
325 return !fuse_valid_type(attr->mode) || in fuse_invalid_attr()
326 attr->size > LLONG_MAX; in fuse_invalid_attr()
360 if (fuse_invalid_attr(&outarg->attr)) in fuse_lookup_name()
364 &outarg->attr, entry_attr_timeout(outarg), in fuse_lookup_name()
485 if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid) || in fuse_create_open()
486 fuse_invalid_attr(&outentry.attr)) in fuse_create_open()
493 &outentry.attr, entry_attr_timeout(&outentry), 0); in fuse_create_open()
594 if (invalid_nodeid(outarg.nodeid) || fuse_invalid_attr(&outarg.attr)) in create_new_entry()
597 if ((outarg.attr.mode ^ mode) & S_IFMT) in create_new_entry()
601 &outarg.attr, entry_attr_timeout(&outarg), 0); in create_new_entry()
884 static void fuse_fillattr(struct inode *inode, struct fuse_attr *attr, in fuse_fillattr() argument
892 attr->size = i_size_read(inode); in fuse_fillattr()
893 attr->mtime = inode->i_mtime.tv_sec; in fuse_fillattr()
894 attr->mtimensec = inode->i_mtime.tv_nsec; in fuse_fillattr()
895 attr->ctime = inode->i_ctime.tv_sec; in fuse_fillattr()
896 attr->ctimensec = inode->i_ctime.tv_nsec; in fuse_fillattr()
900 stat->ino = attr->ino; in fuse_fillattr()
901 stat->mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777); in fuse_fillattr()
902 stat->nlink = attr->nlink; in fuse_fillattr()
903 stat->uid = make_kuid(fc->user_ns, attr->uid); in fuse_fillattr()
904 stat->gid = make_kgid(fc->user_ns, attr->gid); in fuse_fillattr()
906 stat->atime.tv_sec = attr->atime; in fuse_fillattr()
907 stat->atime.tv_nsec = attr->atimensec; in fuse_fillattr()
908 stat->mtime.tv_sec = attr->mtime; in fuse_fillattr()
909 stat->mtime.tv_nsec = attr->mtimensec; in fuse_fillattr()
910 stat->ctime.tv_sec = attr->ctime; in fuse_fillattr()
911 stat->ctime.tv_nsec = attr->ctimensec; in fuse_fillattr()
912 stat->size = attr->size; in fuse_fillattr()
913 stat->blocks = attr->blocks; in fuse_fillattr()
915 if (attr->blksize != 0) in fuse_fillattr()
916 blkbits = ilog2(attr->blksize); in fuse_fillattr()
954 if (fuse_invalid_attr(&outarg.attr) || in fuse_do_getattr()
955 (inode->i_mode ^ outarg.attr.mode) & S_IFMT) { in fuse_do_getattr()
959 fuse_change_attributes(inode, &outarg.attr, in fuse_do_getattr()
963 fuse_fillattr(inode, &outarg.attr, stat); in fuse_do_getattr()
1490 int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, in fuse_do_setattr() argument
1506 attr->ia_valid |= ATTR_FORCE; in fuse_do_setattr()
1508 err = setattr_prepare(dentry, attr); in fuse_do_setattr()
1512 if (attr->ia_valid & ATTR_OPEN) { in fuse_do_setattr()
1514 WARN_ON(!(attr->ia_valid & ATTR_SIZE)); in fuse_do_setattr()
1515 WARN_ON(attr->ia_size != 0); in fuse_do_setattr()
1529 if (attr->ia_valid & ATTR_SIZE) { in fuse_do_setattr()
1537 attr->ia_valid & in fuse_do_setattr()
1551 if (trust_local_cmtime && attr->ia_size != inode->i_size) in fuse_do_setattr()
1552 attr->ia_valid |= ATTR_MTIME | ATTR_CTIME; in fuse_do_setattr()
1557 iattr_to_fattr(fc, attr, &inarg, trust_local_cmtime); in fuse_do_setattr()
1563 if (attr->ia_valid & ATTR_SIZE) { in fuse_do_setattr()
1576 if (fuse_invalid_attr(&outarg.attr) || in fuse_do_setattr()
1577 (inode->i_mode ^ outarg.attr.mode) & S_IFMT) { in fuse_do_setattr()
1586 if (attr->ia_valid & ATTR_MTIME) in fuse_do_setattr()
1587 inode->i_mtime = attr->ia_mtime; in fuse_do_setattr()
1588 if (attr->ia_valid & ATTR_CTIME) in fuse_do_setattr()
1589 inode->i_ctime = attr->ia_ctime; in fuse_do_setattr()
1593 fuse_change_attributes_common(inode, &outarg.attr, in fuse_do_setattr()
1598 i_size_write(inode, outarg.attr.size); in fuse_do_setattr()
1611 S_ISREG(inode->i_mode) && oldsize != outarg.attr.size) { in fuse_do_setattr()
1612 truncate_pagecache(inode, outarg.attr.size); in fuse_do_setattr()
1627 static int fuse_setattr(struct dentry *entry, struct iattr *attr) in fuse_setattr() argument
1631 struct file *file = (attr->ia_valid & ATTR_FILE) ? attr->ia_file : NULL; in fuse_setattr()
1637 if (attr->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) { in fuse_setattr()
1638 attr->ia_valid &= ~(ATTR_KILL_SUID | ATTR_KILL_SGID | in fuse_setattr()
1656 attr->ia_mode = inode->i_mode; in fuse_setattr()
1658 attr->ia_valid |= ATTR_MODE; in fuse_setattr()
1659 attr->ia_mode &= ~S_ISUID; in fuse_setattr()
1662 attr->ia_valid |= ATTR_MODE; in fuse_setattr()
1663 attr->ia_mode &= ~S_ISGID; in fuse_setattr()
1667 if (!attr->ia_valid) in fuse_setattr()
1670 ret = fuse_do_setattr(entry, attr, file); in fuse_setattr()
1680 if (d_is_dir(entry) && (attr->ia_valid & ATTR_MODE)) in fuse_setattr()