Skip to content

Commit 61a4fa3

Browse files
author
Al Viro
committed
9p: don't bother with always_delete_dentry
just set DCACHE_DONTCACHE for "don't cache" mounts... Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 3333ed3 commit 61a4fa3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

fs/9p/vfs_dentry.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ const struct dentry_operations v9fs_cached_dentry_operations = {
127127
};
128128

129129
const struct dentry_operations v9fs_dentry_operations = {
130-
.d_delete = always_delete_dentry,
131130
.d_release = v9fs_dentry_release,
132131
.d_unalias_trylock = v9fs_dentry_unalias_trylock,
133132
.d_unalias_unlock = v9fs_dentry_unalias_unlock,

fs/9p/vfs_super.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
134134
if (retval)
135135
goto release_sb;
136136

137-
if (v9ses->cache & (CACHE_META|CACHE_LOOSE))
137+
if (v9ses->cache & (CACHE_META|CACHE_LOOSE)) {
138138
set_default_d_op(sb, &v9fs_cached_dentry_operations);
139-
else
139+
} else {
140140
set_default_d_op(sb, &v9fs_dentry_operations);
141+
sb->s_d_flags |= DCACHE_DONTCACHE;
142+
}
141143

142144
inode = v9fs_get_new_inode_from_fid(v9ses, fid, sb);
143145
if (IS_ERR(inode)) {

0 commit comments

Comments
 (0)