aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-28 16:03:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-28 16:03:41 -0400
commit36947a76826111e661a26cb0f668a5be6cc3ddb4 (patch)
treeed5d92c9d71f9ca68e6a3583a10ebf911c9c44dd /fs/jffs2
parenta947e23a8ec04bccbfe98c5a2d64cd1f88b612d5 (diff)
parent69b4573296469fd3f70cf7044693074980517067 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (36 commits) Cache xattr security drop check for write v2 fs: block_page_mkwrite should wait for writeback to finish mm: Wait for writeback when grabbing pages to begin a write configfs: remove unnecessary dentry_unhash on rmdir, dir rename fat: remove unnecessary dentry_unhash on rmdir, dir rename hpfs: remove unnecessary dentry_unhash on rmdir, dir rename minix: remove unnecessary dentry_unhash on rmdir, dir rename fuse: remove unnecessary dentry_unhash on rmdir, dir rename coda: remove unnecessary dentry_unhash on rmdir, dir rename afs: remove unnecessary dentry_unhash on rmdir, dir rename affs: remove unnecessary dentry_unhash on rmdir, dir rename 9p: remove unnecessary dentry_unhash on rmdir, dir rename ncpfs: fix rename over directory with dangling references ncpfs: document dentry_unhash usage ecryptfs: remove unnecessary dentry_unhash on rmdir, dir rename hostfs: remove unnecessary dentry_unhash on rmdir, dir rename hfsplus: remove unnecessary dentry_unhash on rmdir, dir rename hfs: remove unnecessary dentry_unhash on rmdir, dir rename omfs: remove unnecessary dentry_unhash on rmdir, dir rneame udf: remove unnecessary dentry_unhash from rmdir, dir rename ...
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/dir.c5
-rw-r--r--fs/jffs2/fs.c2
-rw-r--r--fs/jffs2/os-linux.h2
3 files changed, 2 insertions, 7 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 9a1e86fc1362..4bca6a2e5c07 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -605,8 +605,6 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
605 int ret; 605 int ret;
606 uint32_t now = get_seconds(); 606 uint32_t now = get_seconds();
607 607
608 dentry_unhash(dentry);
609
610 for (fd = f->dents ; fd; fd = fd->next) { 608 for (fd = f->dents ; fd; fd = fd->next) {
611 if (fd->ino) 609 if (fd->ino)
612 return -ENOTEMPTY; 610 return -ENOTEMPTY;
@@ -782,9 +780,6 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
782 uint8_t type; 780 uint8_t type;
783 uint32_t now; 781 uint32_t now;
784 782
785 if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
786 dentry_unhash(new_dentry);
787
788 /* The VFS will check for us and prevent trying to rename a 783 /* The VFS will check for us and prevent trying to rename a
789 * file over a directory and vice versa, but if it's a directory, 784 * file over a directory and vice versa, but if it's a directory,
790 * the VFS can't check whether the victim is empty. The filesystem 785 * the VFS can't check whether the victim is empty. The filesystem
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index e896e67767eb..46ad619b6124 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -357,7 +357,7 @@ error:
357 return ERR_PTR(ret); 357 return ERR_PTR(ret);
358} 358}
359 359
360void jffs2_dirty_inode(struct inode *inode) 360void jffs2_dirty_inode(struct inode *inode, int flags)
361{ 361{
362 struct iattr iattr; 362 struct iattr iattr;
363 363
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 00bae7cc2e48..65c6c43ca482 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -172,7 +172,7 @@ int jffs2_setattr (struct dentry *, struct iattr *);
172int jffs2_do_setattr (struct inode *, struct iattr *); 172int jffs2_do_setattr (struct inode *, struct iattr *);
173struct inode *jffs2_iget(struct super_block *, unsigned long); 173struct inode *jffs2_iget(struct super_block *, unsigned long);
174void jffs2_evict_inode (struct inode *); 174void jffs2_evict_inode (struct inode *);
175void jffs2_dirty_inode(struct inode *inode); 175void jffs2_dirty_inode(struct inode *inode, int flags);
176struct inode *jffs2_new_inode (struct inode *dir_i, int mode, 176struct inode *jffs2_new_inode (struct inode *dir_i, int mode,
177 struct jffs2_raw_inode *ri); 177 struct jffs2_raw_inode *ri);
178int jffs2_statfs (struct dentry *, struct kstatfs *); 178int jffs2_statfs (struct dentry *, struct kstatfs *);