Lines Matching refs:inode

67 static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
72 struct inode *inode;
76 inode = ERR_PTR(-ENOMEM);
82 inode = ERR_PTR(err);
85 inode = dir_search_u(dir, uni, NULL);
93 * If the MFT record of ntfs inode is not a base record, inode->i_op can be NULL.
96 if (!IS_ERR_OR_NULL(inode) && !inode->i_op) {
97 iput(inode);
98 inode = ERR_PTR(-EINVAL);
101 return d_splice_alias(inode, dentry);
107 static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir,
110 struct inode *inode;
112 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0,
115 return IS_ERR(inode) ? PTR_ERR(inode) : 0;
123 static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
126 struct inode *inode;
128 inode = ntfs_create_inode(idmap, dir, dentry, NULL, mode, rdev, NULL, 0,
131 return IS_ERR(inode) ? PTR_ERR(inode) : 0;
137 static int ntfs_link(struct dentry *ode, struct inode *dir, struct dentry *de)
140 struct inode *inode = d_inode(ode);
141 struct ntfs_inode *ni = ntfs_i(inode);
143 if (S_ISDIR(inode->i_mode))
146 if (inode->i_nlink >= NTFS_LINK_MAX)
150 if (inode != dir)
153 inc_nlink(inode);
154 ihold(inode);
156 err = ntfs_link_inode(inode, de);
160 inode, inode_set_ctime_current(dir));
161 mark_inode_dirty(inode);
163 d_instantiate(de, inode);
165 drop_nlink(inode);
166 iput(inode);
169 if (inode != dir)
179 static int ntfs_unlink(struct inode *dir, struct dentry *dentry)
199 static int ntfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
203 struct inode *inode;
208 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFLNK | 0777, 0,
211 return IS_ERR(inode) ? PTR_ERR(inode) : 0;
217 static int ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
220 struct inode *inode;
222 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFDIR | mode, 0,
225 return IS_ERR(inode) ? PTR_ERR(inode) : 0;
231 static int ntfs_rmdir(struct inode *dir, struct dentry *dentry)
251 static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
252 struct dentry *dentry, struct inode *new_dir,
260 struct inode *inode = d_inode(dentry);
261 struct ntfs_inode *ni = ntfs_i(inode);
262 struct inode *new_inode = d_inode(new_dentry);
291 if (ntfs_is_meta_file(sbi, inode->i_ino)) {
337 _ntfs_bad_inode(inode);
340 mark_inode_dirty(inode);
349 ntfs_sync_inode(inode);
366 static int ntfs_atomic_open(struct inode *dir, struct dentry *dentry,
370 struct inode *inode;
434 inode = ntfs_create_inode(mnt_idmap(file->f_path.mnt), dir, dentry, uni,
436 err = IS_ERR(inode) ? PTR_ERR(inode) :
452 struct inode *inode = d_inode(child);
453 struct ntfs_inode *ni = ntfs_i(inode);
466 ntfs_iget5(inode->i_sb, &fname->home, NULL));