• Home
  • Raw
  • Download

Lines Matching refs:inode

18 static int add_nondir(struct dentry *dentry, struct inode *inode)  in add_nondir()  argument
20 int err = sysv_add_link(dentry, inode); in add_nondir()
22 d_instantiate(dentry, inode); in add_nondir()
25 inode_dec_link_count(inode); in add_nondir()
26 iput(inode); in add_nondir()
45 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) in sysv_lookup()
47 struct inode * inode = NULL; in sysv_lookup() local
56 inode = sysv_iget(dir->i_sb, ino); in sysv_lookup()
57 if (IS_ERR(inode)) in sysv_lookup()
58 return ERR_CAST(inode); in sysv_lookup()
60 d_add(dentry, inode); in sysv_lookup()
64 static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, dev_t rdev) in sysv_mknod()
66 struct inode * inode; in sysv_mknod() local
72 inode = sysv_new_inode(dir, mode); in sysv_mknod()
73 err = PTR_ERR(inode); in sysv_mknod()
75 if (!IS_ERR(inode)) { in sysv_mknod()
76 sysv_set_inode(inode, rdev); in sysv_mknod()
77 mark_inode_dirty(inode); in sysv_mknod()
78 err = add_nondir(dentry, inode); in sysv_mknod()
83 static int sysv_create(struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) in sysv_create()
88 static int sysv_symlink(struct inode * dir, struct dentry * dentry, in sysv_symlink()
93 struct inode * inode; in sysv_symlink() local
98 inode = sysv_new_inode(dir, S_IFLNK|0777); in sysv_symlink()
99 err = PTR_ERR(inode); in sysv_symlink()
100 if (IS_ERR(inode)) in sysv_symlink()
103 sysv_set_inode(inode, 0); in sysv_symlink()
104 err = page_symlink(inode, symname, l); in sysv_symlink()
108 mark_inode_dirty(inode); in sysv_symlink()
109 err = add_nondir(dentry, inode); in sysv_symlink()
114 inode_dec_link_count(inode); in sysv_symlink()
115 iput(inode); in sysv_symlink()
119 static int sysv_link(struct dentry * old_dentry, struct inode * dir, in sysv_link()
122 struct inode *inode = old_dentry->d_inode; in sysv_link() local
124 if (inode->i_nlink >= SYSV_SB(inode->i_sb)->s_link_max) in sysv_link()
127 inode->i_ctime = CURRENT_TIME_SEC; in sysv_link()
128 inode_inc_link_count(inode); in sysv_link()
129 atomic_inc(&inode->i_count); in sysv_link()
131 return add_nondir(dentry, inode); in sysv_link()
134 static int sysv_mkdir(struct inode * dir, struct dentry *dentry, int mode) in sysv_mkdir()
136 struct inode * inode; in sysv_mkdir() local
143 inode = sysv_new_inode(dir, S_IFDIR|mode); in sysv_mkdir()
144 err = PTR_ERR(inode); in sysv_mkdir()
145 if (IS_ERR(inode)) in sysv_mkdir()
148 sysv_set_inode(inode, 0); in sysv_mkdir()
150 inode_inc_link_count(inode); in sysv_mkdir()
152 err = sysv_make_empty(inode, dir); in sysv_mkdir()
156 err = sysv_add_link(dentry, inode); in sysv_mkdir()
160 d_instantiate(dentry, inode); in sysv_mkdir()
165 inode_dec_link_count(inode); in sysv_mkdir()
166 inode_dec_link_count(inode); in sysv_mkdir()
167 iput(inode); in sysv_mkdir()
173 static int sysv_unlink(struct inode * dir, struct dentry * dentry) in sysv_unlink()
175 struct inode * inode = dentry->d_inode; in sysv_unlink() local
188 inode->i_ctime = dir->i_ctime; in sysv_unlink()
189 inode_dec_link_count(inode); in sysv_unlink()
194 static int sysv_rmdir(struct inode * dir, struct dentry * dentry) in sysv_rmdir()
196 struct inode *inode = dentry->d_inode; in sysv_rmdir() local
199 if (sysv_empty_dir(inode)) { in sysv_rmdir()
202 inode->i_size = 0; in sysv_rmdir()
203 inode_dec_link_count(inode); in sysv_rmdir()
214 static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry, in sysv_rename()
215 struct inode * new_dir, struct dentry * new_dentry) in sysv_rename()
217 struct inode * old_inode = old_dentry->d_inode; in sysv_rename()
218 struct inode * new_inode = new_dentry->d_inode; in sysv_rename()