diff options
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r-- | fs/jffs2/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 9659b7c00468..be6169bd8acd 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c | |||
@@ -245,7 +245,7 @@ static int jffs2_unlink(struct inode *dir_i, struct dentry *dentry) | |||
245 | ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name, | 245 | ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name, |
246 | dentry->d_name.len, dead_f, now); | 246 | dentry->d_name.len, dead_f, now); |
247 | if (dead_f->inocache) | 247 | if (dead_f->inocache) |
248 | dentry->d_inode->i_nlink = dead_f->inocache->pino_nlink; | 248 | set_nlink(dentry->d_inode, dead_f->inocache->pino_nlink); |
249 | if (!ret) | 249 | if (!ret) |
250 | dir_i->i_mtime = dir_i->i_ctime = ITIME(now); | 250 | dir_i->i_mtime = dir_i->i_ctime = ITIME(now); |
251 | return ret; | 251 | return ret; |
@@ -278,7 +278,7 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de | |||
278 | 278 | ||
279 | if (!ret) { | 279 | if (!ret) { |
280 | mutex_lock(&f->sem); | 280 | mutex_lock(&f->sem); |
281 | old_dentry->d_inode->i_nlink = ++f->inocache->pino_nlink; | 281 | set_nlink(old_dentry->d_inode, ++f->inocache->pino_nlink); |
282 | mutex_unlock(&f->sem); | 282 | mutex_unlock(&f->sem); |
283 | d_instantiate(dentry, old_dentry->d_inode); | 283 | d_instantiate(dentry, old_dentry->d_inode); |
284 | dir_i->i_mtime = dir_i->i_ctime = ITIME(now); | 284 | dir_i->i_mtime = dir_i->i_ctime = ITIME(now); |
@@ -497,7 +497,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) | |||
497 | f = JFFS2_INODE_INFO(inode); | 497 | f = JFFS2_INODE_INFO(inode); |
498 | 498 | ||
499 | /* Directories get nlink 2 at start */ | 499 | /* Directories get nlink 2 at start */ |
500 | inode->i_nlink = 2; | 500 | set_nlink(inode, 2); |
501 | /* but ic->pino_nlink is the parent ino# */ | 501 | /* but ic->pino_nlink is the parent ino# */ |
502 | f->inocache->pino_nlink = dir_i->i_ino; | 502 | f->inocache->pino_nlink = dir_i->i_ino; |
503 | 503 | ||