25 inode_dec_link_count(inode);
30 static int sysv_hash(
const struct dentry *dentry,
const struct inode *inode,
46 static struct dentry *sysv_lookup(
struct inode * dir,
struct dentry * dentry,
unsigned int flags)
48 struct inode * inode =
NULL;
58 return ERR_CAST(inode);
69 if (!old_valid_dev(rdev))
77 mark_inode_dirty(inode);
78 err = add_nondir(dentry, inode);
83 static int sysv_create(
struct inode * dir,
struct dentry * dentry,
umode_t mode,
bool excl)
85 return sysv_mknod(dir, dentry, mode, 0);
88 static int sysv_symlink(
struct inode * dir,
struct dentry * dentry,
95 if (l > dir->
i_sb->s_blocksize)
108 mark_inode_dirty(inode);
109 err = add_nondir(dentry, inode);
114 inode_dec_link_count(inode);
119 static int sysv_link(
struct dentry * old_dentry,
struct inode * dir,
120 struct dentry * dentry)
122 struct inode *inode = old_dentry->
d_inode;
125 inode_inc_link_count(inode);
128 return add_nondir(dentry, inode);
131 static int sysv_mkdir(
struct inode * dir,
struct dentry *dentry,
umode_t mode)
133 struct inode *
inode;
136 inode_inc_link_count(dir);
139 err = PTR_ERR(inode);
145 inode_inc_link_count(inode);
160 inode_dec_link_count(inode);
161 inode_dec_link_count(inode);
164 inode_dec_link_count(dir);
168 static int sysv_unlink(
struct inode * dir,
struct dentry * dentry)
170 struct inode * inode = dentry->
d_inode;
184 inode_dec_link_count(inode);
189 static int sysv_rmdir(
struct inode * dir,
struct dentry * dentry)
191 struct inode *inode = dentry->
d_inode;
195 err = sysv_unlink(dir, dentry);
198 inode_dec_link_count(inode);
199 inode_dec_link_count(dir);
209 static int sysv_rename(
struct inode * old_dir,
struct dentry * old_dentry,
210 struct inode * new_dir,
struct dentry * new_dentry)
212 struct inode * old_inode = old_dentry->
d_inode;
214 struct page * dir_page =
NULL;
216 struct page * old_page;
232 struct page * new_page;
247 inode_dec_link_count(new_inode);
253 inode_inc_link_count(new_dir);
257 mark_inode_dirty(old_inode);
261 inode_dec_link_count(old_dir);
281 .create = sysv_create,
282 .lookup = sysv_lookup,
284 .unlink = sysv_unlink,
285 .symlink = sysv_symlink,
289 .rename = sysv_rename,