summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d0337ca)
The code protected by push_ctxt() and pop_ctx() never tries to access
any user-space data, so call set_fs() to KERNEL_DS is not needed.
So remove the 'fs' field and related code.
In linux-5.10 this code fails to compile as set_fs() is deprecated.
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Idb2744d656dc4228375b6da54673e38cc1c112f5
Reviewed-on: https://review.whamcloud.com/40910
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct lvfs_run_ctxt {
struct vfsmount *pwdmnt;
struct dentry *pwd;
struct lvfs_run_ctxt {
struct vfsmount *pwdmnt;
struct dentry *pwd;
int umask;
struct dt_device *dt;
#ifdef OBD_CTXT_DEBUG
int umask;
struct dt_device *dt;
#ifdef OBD_CTXT_DEBUG
OBD_SET_CTXT_MAGIC(newctxt);
newctxt->pwdmnt = dev->od_mnt;
newctxt->pwd = dev->od_mnt->mnt_root;
OBD_SET_CTXT_MAGIC(newctxt);
newctxt->pwdmnt = dev->od_mnt;
newctxt->pwd = dev->od_mnt->mnt_root;
- newctxt->fs = KERNEL_DS;
newctxt->umask = current_umask();
newctxt->dt = NULL;
newctxt->umask = current_umask();
newctxt->dt = NULL;
OBD_SET_CTXT_MAGIC(ctxt);
ctxt->pwdmnt = dev->od_mnt;
ctxt->pwd = dev->od_mnt->mnt_root;
OBD_SET_CTXT_MAGIC(ctxt);
ctxt->pwdmnt = dev->od_mnt;
ctxt->pwd = dev->od_mnt->mnt_root;
init_rwsem(&scrub->os_rwsem);
spin_lock_init(&scrub->os_lock);
init_rwsem(&scrub->os_rwsem);
spin_lock_init(&scrub->os_lock);
ASSERT_CTXT_MAGIC(new_ctx->magic);
OBD_SET_CTXT_MAGIC(save);
ASSERT_CTXT_MAGIC(new_ctx->magic);
OBD_SET_CTXT_MAGIC(save);
LASSERT(ll_d_count(current->fs->pwd.dentry));
LASSERT(ll_d_count(new_ctx->pwd));
save->pwd = dget(current->fs->pwd.dentry);
LASSERT(ll_d_count(current->fs->pwd.dentry));
LASSERT(ll_d_count(new_ctx->pwd));
save->pwd = dget(current->fs->pwd.dentry);
LASSERT(new_ctx->pwdmnt);
current->fs->umask = 0; /* umask already applied on client */
LASSERT(new_ctx->pwdmnt);
current->fs->umask = 0; /* umask already applied on client */
ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd);
}
EXPORT_SYMBOL(push_ctxt);
ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd);
}
EXPORT_SYMBOL(push_ctxt);
LASSERTF(current->fs->pwd.mnt == new_ctx->pwdmnt, "%p != %p\n",
current->fs->pwd.mnt, new_ctx->pwdmnt);
LASSERTF(current->fs->pwd.mnt == new_ctx->pwdmnt, "%p != %p\n",
current->fs->pwd.mnt, new_ctx->pwdmnt);
ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
dput(saved->pwd);
ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
dput(saved->pwd);