Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/viro/vfs

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
  • Loading branch information
Linus Torvalds committed Sep 30, 2013
2 parents 5c282e8 + 13f3583 commit cbb16be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
7 changes: 4 additions & 3 deletions fs/ocfs2/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions fs/sysv/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cbb16be

Please sign in to comment.