• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/linux/linux/fs/sysv/

Lines Matching refs:inode

19 static inline void inc_count(struct inode *inode)
21 inode->i_nlink++;
22 mark_inode_dirty(inode);
25 static inline void dec_count(struct inode *inode)
27 inode->i_nlink--;
28 mark_inode_dirty(inode);
31 static int add_nondir(struct dentry *dentry, struct inode *inode)
33 int err = sysv_add_link(dentry, inode);
35 d_instantiate(dentry, inode);
38 dec_count(inode);
39 iput(inode);
67 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry)
69 struct inode * inode = NULL;
78 inode = iget(dir->i_sb, ino);
79 if (!inode)
82 d_add(dentry, inode);
86 static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, int rdev)
88 struct inode * inode = sysv_new_inode(dir, mode);
89 int err = PTR_ERR(inode);
91 if (!IS_ERR(inode)) {
92 sysv_set_inode(inode, rdev);
93 mark_inode_dirty(inode);
94 err = add_nondir(dentry, inode);
99 static int sysv_create(struct inode * dir, struct dentry * dentry, int mode)
104 static int sysv_symlink(struct inode * dir, struct dentry * dentry,
109 struct inode * inode;
114 inode = sysv_new_inode(dir, S_IFLNK|0777);
115 err = PTR_ERR(inode);
116 if (IS_ERR(inode))
119 sysv_set_inode(inode, 0);
120 err = block_symlink(inode, symname, l);
124 mark_inode_dirty(inode);
125 err = add_nondir(dentry, inode);
130 dec_count(inode);
131 iput(inode);
135 static int sysv_link(struct dentry * old_dentry, struct inode * dir,
138 struct inode *inode = old_dentry->d_inode;
140 if (S_ISDIR(inode->i_mode))
143 if (inode->i_nlink >= inode->i_sb->sv_link_max)
146 inode->i_ctime = CURRENT_TIME;
147 inc_count(inode);
148 atomic_inc(&inode->i_count);
150 return add_nondir(dentry, inode);
153 static int sysv_mkdir(struct inode * dir, struct dentry *dentry, int mode)
155 struct inode * inode;
162 inode = sysv_new_inode(dir, S_IFDIR|mode);
163 err = PTR_ERR(inode);
164 if (IS_ERR(inode))
167 sysv_set_inode(inode, 0);
169 inc_count(inode);
171 err = sysv_make_empty(inode, dir);
175 err = sysv_add_link(dentry, inode);
179 d_instantiate(dentry, inode);
184 dec_count(inode);
185 dec_count(inode);
186 iput(inode);
192 static int sysv_unlink(struct inode * dir, struct dentry * dentry)
194 struct inode * inode = dentry->d_inode;
207 inode->i_ctime = dir->i_ctime;
208 dec_count(inode);
213 static int sysv_rmdir(struct inode * dir, struct dentry * dentry)
215 struct inode *inode = dentry->d_inode;
218 if (sysv_empty_dir(inode)) {
221 inode->i_size = 0;
222 dec_count(inode);
233 static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
234 struct inode * new_dir, struct dentry * new_dentry)
236 struct inode * old_inode = old_dentry->d_inode;
237 struct inode * new_inode = new_dentry->d_inode;