Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbb16bec authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull assorted vfs fixes from Al Viro:
 "A couple of bug fixes + removal of dead code in afs ->d_revalidate()"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  afs: dget_parent() can't return a negative dentry
  ocfs2: needs ->d_lock to poke in ->d_parent->d_inode from ->d_revalidate()
  sysv: Add forgotten superblock lock init for v7 fs
parents 5c282e85 13f35838
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -600,9 +600,6 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)

	/* lock down the parent dentry so we can peer at it */
	parent = dget_parent(dentry);
	if (!parent->d_inode)
		goto out_bad;

	dir = AFS_FS_I(parent->d_inode);

	/* validate the parent directory */
+4 −3
Original line number Diff line number Diff line
@@ -70,9 +70,10 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags)
	 */
	if (inode == NULL) {
		unsigned long gen = (unsigned long) dentry->d_fsdata;
		unsigned long pgen =
			OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen;

		unsigned long pgen;
		spin_lock(&dentry->d_lock);
		pgen = OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen;
		spin_unlock(&dentry->d_lock);
		trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len,
						       dentry->d_name.name,
						       pgen, gen);
+1 −0
Original line number Diff line number Diff line
@@ -487,6 +487,7 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
	sbi->s_sb = sb;
	sbi->s_block_base = 0;
	sbi->s_type = FSTYPE_V7;
	mutex_init(&sbi->s_lock);
	sb->s_fs_info = sbi;
	
	sb_set_blocksize(sb, 512);