From: Edward Shishkin Added missed reiser4_{init, exit}_context() Cc: Sven Muller Signed-off-by: Andrew Morton --- fs/reiser4/export_ops.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff -puN fs/reiser4/export_ops.c~reiser4-new-export_ops-fixup fs/reiser4/export_ops.c --- a/fs/reiser4/export_ops.c~reiser4-new-export_ops-fixup +++ a/fs/reiser4/export_ops.c @@ -257,19 +257,28 @@ static struct dentry *reiser4_get_dentry { struct inode *dir; dir_plugin *dplug; + struct dentry *result; + reiser4_context *ctx; assert("nikita-3527", child != NULL); - /* see comment in reiser4_get_dentry() about following assertion */ - assert("nikita-3528", is_in_reiser4_context()); dir = child->d_inode; assert("nikita-3529", dir != NULL); + + ctx = reiser4_init_context(dir->i_sb); + if (IS_ERR(ctx)) + return (void *)ctx; + dplug = inode_dir_plugin(dir); assert("nikita-3531", ergo(dplug != NULL, dplug->get_parent != NULL)); - if (dplug != NULL) - return dplug->get_parent(dir); - else + + if (unlikely(dplug == NULL)) { + reiser4_exit_context(ctx); return ERR_PTR(RETERR(-ENOTDIR)); + } + result = dplug->get_parent(dir); + reiser4_exit_context(ctx); + return result; } /** _