mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
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>
This commit is contained in:
parent
3333ed35b8
commit
61a4fa39a3
2 changed files with 4 additions and 3 deletions
|
@ -127,7 +127,6 @@ const struct dentry_operations v9fs_cached_dentry_operations = {
|
|||
};
|
||||
|
||||
const struct dentry_operations v9fs_dentry_operations = {
|
||||
.d_delete = always_delete_dentry,
|
||||
.d_release = v9fs_dentry_release,
|
||||
.d_unalias_trylock = v9fs_dentry_unalias_trylock,
|
||||
.d_unalias_unlock = v9fs_dentry_unalias_unlock,
|
||||
|
|
|
@ -134,10 +134,12 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
|
|||
if (retval)
|
||||
goto release_sb;
|
||||
|
||||
if (v9ses->cache & (CACHE_META|CACHE_LOOSE))
|
||||
if (v9ses->cache & (CACHE_META|CACHE_LOOSE)) {
|
||||
set_default_d_op(sb, &v9fs_cached_dentry_operations);
|
||||
else
|
||||
} else {
|
||||
set_default_d_op(sb, &v9fs_dentry_operations);
|
||||
sb->s_d_flags |= DCACHE_DONTCACHE;
|
||||
}
|
||||
|
||||
inode = v9fs_get_new_inode_from_fid(v9ses, fid, sb);
|
||||
if (IS_ERR(inode)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue