Lines Matching defs:inode
45 /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
73 struct inode *inode;
76 inode = path->dentry->d_inode;
79 if (S_ISDIR(inode->i_mode))
81 if (!S_ISREG(inode->i_mode))
89 error = inode_permission(idmap, inode, MAY_WRITE);
94 if (IS_APPEND(inode))
97 error = get_write_access(inode);
105 error = break_lease(inode, O_WRONLY);
114 put_write_access(inode);
158 struct inode *inode;
167 inode = dentry->d_inode;
168 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE))
175 /* Check IS_APPEND on real upper inode */
178 sb_start_write(inode->i_sb);
183 sb_end_write(inode->i_sb);
248 struct inode *inode = file_inode(file);
289 if ((mode & ~FALLOC_FL_KEEP_SIZE) && IS_APPEND(inode))
292 if (IS_IMMUTABLE(inode))
298 if (IS_SWAPFILE(inode))
313 if (S_ISFIFO(inode->i_mode))
316 if (S_ISDIR(inode->i_mode))
319 if (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))
326 if (sum > inode->i_sb->s_maxbytes)
470 struct inode *inode;
497 inode = d_backing_inode(path.dentry);
499 if ((mode & MAY_EXEC) && S_ISREG(inode->i_mode)) {
509 res = inode_permission(mnt_idmap(path.mnt), inode, mode | MAY_ACCESS);
511 if (res || !(mode & S_IWOTH) || special_file(inode->i_mode))
638 struct inode *inode = path->dentry->d_inode;
639 struct inode *delegated_inode = NULL;
647 inode_lock(inode);
651 newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
656 inode_unlock(inode);
762 struct inode *inode = path->dentry->d_inode;
763 struct inode *delegated_inode = NULL;
773 fs_userns = i_user_ns(inode);
783 inode_lock(inode);
784 if (!S_ISDIR(inode->i_mode))
786 setattr_should_drop_sgid(idmap, inode);
795 inode_unlock(inode);
908 int (*open)(struct inode *, struct file *))
911 struct inode *inode = f->f_path.dentry->d_inode;
915 f->f_inode = inode;
916 f->f_mapping = inode->i_mapping;
927 i_readcount_inc(inode);
928 } else if (f->f_mode & FMODE_WRITE && !special_file(inode->i_mode)) {
936 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))
939 f->f_op = fops_get(inode->i_fop);
958 error = open(inode, f);
993 if (filemap_nr_thps(inode->i_mapping)) {
994 struct address_space *mapping = inode->i_mapping;
996 filemap_invalidate_lock(inode->i_mapping);
1005 filemap_invalidate_unlock(inode->i_mapping);
1042 int (*open)(struct inode *, struct file *))
1610 * Called when an inode is about to be open.
1615 int generic_file_open(struct inode * inode, struct file * filp)
1617 if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
1630 int nonseekable_open(struct inode *inode, struct file *filp)
1648 int stream_open(struct inode *inode, struct file *filp)