Lines Matching refs:inode
20 static int bad_file_open(struct inode *inode, struct file *filp)
31 struct inode *dir, struct dentry *dentry,
37 static struct dentry *bad_inode_lookup(struct inode *dir,
43 static int bad_inode_link (struct dentry *old_dentry, struct inode *dir,
49 static int bad_inode_unlink(struct inode *dir, struct dentry *dentry)
55 struct inode *dir, struct dentry *dentry,
61 static int bad_inode_mkdir(struct mnt_idmap *idmap, struct inode *dir,
67 static int bad_inode_rmdir (struct inode *dir, struct dentry *dentry)
72 static int bad_inode_mknod(struct mnt_idmap *idmap, struct inode *dir,
79 struct inode *old_dir, struct dentry *old_dentry,
80 struct inode *new_dir, struct dentry *new_dentry,
93 struct inode *inode, int mask)
118 struct inode *inode,
124 static struct posix_acl *bad_inode_get_acl(struct inode *inode, int type, bool rcu)
129 static int bad_inode_fiemap(struct inode *inode,
136 static int bad_inode_update_time(struct inode *inode, int flags)
141 static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry,
149 struct inode *inode, struct file *file,
189 * When a filesystem is unable to read an inode due to an I/O error in
198 * make_bad_inode - mark an inode bad due to an I/O error
199 * @inode: Inode to mark bad
201 * When an inode cannot be read due to a media or remote network
202 * failure this function makes the inode "bad" and causes I/O operations
206 void make_bad_inode(struct inode *inode)
208 remove_inode_hash(inode);
210 inode->i_mode = S_IFREG;
211 inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
212 inode->i_op = &bad_inode_ops;
213 inode->i_opflags &= ~IOP_XATTR;
214 inode->i_fop = &bad_file_ops;
219 * This tests whether an inode has been flagged as bad. The test uses
225 * is_bad_inode - is an inode errored
226 * @inode: inode to test
228 * Returns true if the inode in question has been marked as bad.
231 bool is_bad_inode(struct inode *inode)
233 return (inode->i_op == &bad_inode_ops);
239 * iget_failed - Mark an under-construction inode as dead and release it
240 * @inode: The inode to discard
242 * Mark an under-construction inode as dead and release it.
244 void iget_failed(struct inode *inode)
246 make_bad_inode(inode);
247 unlock_new_inode(inode);
248 iput(inode);