Skip to content

Commit 9b24349

Browse files
committed
Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: "A couple of fixes - revert of regression from this cycle and a fix for erofs failure exit breakage (had been there since way back)" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: erofs: fix handling kern_mount() failure Revert "get rid of DCACHE_GENOCIDE"
2 parents ab0a97c + 2c88c16 commit 9b24349

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

fs/dcache.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3061,7 +3061,10 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
30613061
if (d_unhashed(dentry) || !dentry->d_inode)
30623062
return D_WALK_SKIP;
30633063

3064-
dentry->d_lockref.count--;
3064+
if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
3065+
dentry->d_flags |= DCACHE_GENOCIDE;
3066+
dentry->d_lockref.count--;
3067+
}
30653068
}
30663069
return D_WALK_CONTINUE;
30673070
}

fs/erofs/fscache.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,12 @@ static int erofs_fscache_init_domain(struct super_block *sb)
381381
goto out;
382382

383383
if (!erofs_pseudo_mnt) {
384-
erofs_pseudo_mnt = kern_mount(&erofs_fs_type);
385-
if (IS_ERR(erofs_pseudo_mnt)) {
386-
err = PTR_ERR(erofs_pseudo_mnt);
384+
struct vfsmount *mnt = kern_mount(&erofs_fs_type);
385+
if (IS_ERR(mnt)) {
386+
err = PTR_ERR(mnt);
387387
goto out;
388388
}
389+
erofs_pseudo_mnt = mnt;
389390
}
390391

391392
domain->volume = sbi->volume;

include/linux/dcache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ struct dentry_operations {
173173
#define DCACHE_DONTCACHE BIT(7) /* Purge from memory on final dput() */
174174

175175
#define DCACHE_CANT_MOUNT BIT(8)
176+
#define DCACHE_GENOCIDE BIT(9)
176177
#define DCACHE_SHRINK_LIST BIT(10)
177178

178179
#define DCACHE_OP_WEAK_REVALIDATE BIT(11)

0 commit comments

Comments
 (0)