Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
filesystems
lustre_2_12
0020-LU-14195-lustre-remove-fs-from-struct-lvfs...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0020-LU-14195-lustre-remove-fs-from-struct-lvfs_run_ctxt.patch of Package lustre_2_12
From 19aa3db0b39fabc09e12d03fad2c6b4bc27947fa Mon Sep 17 00:00:00 2001 From: Mr NeilBrown <neilb@suse.de> Date: Wed, 9 Dec 2020 13:11:18 +1100 Subject: [PATCH 20/35] LU-14195 lustre: remove 'fs' from 'struct lvfs_run_ctxt' 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> --- lustre/include/lvfs.h | 1 - lustre/osd-ldiskfs/osd_compat.c | 1 - lustre/osd-ldiskfs/osd_scrub.c | 1 - lustre/ptlrpc/sec_ctx.c | 3 --- 4 files changed, 6 deletions(-) diff --git a/lustre/include/lvfs.h b/lustre/include/lvfs.h index 856ee1972aa0..f24aff819f66 100644 --- a/lustre/include/lvfs.h +++ b/lustre/include/lvfs.h @@ -52,7 +52,6 @@ struct dt_device; struct lvfs_run_ctxt { struct vfsmount *pwdmnt; struct dentry *pwd; - mm_segment_t fs; int umask; struct dt_device *dt; #ifdef OBD_CTXT_DEBUG diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c index 1374f90bd3c1..f39e39a48968 100644 --- a/lustre/osd-ldiskfs/osd_compat.c +++ b/lustre/osd-ldiskfs/osd_compat.c @@ -59,7 +59,6 @@ static void osd_push_ctxt(const struct osd_device *dev, OBD_SET_CTXT_MAGIC(newctxt); newctxt->pwdmnt = dev->od_mnt; newctxt->pwd = dev->od_mnt->mnt_root; - newctxt->fs = get_ds(); newctxt->umask = current_umask(); newctxt->dt = NULL; diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c index 9e193ee79853..9f0e123fc48f 100644 --- a/lustre/osd-ldiskfs/osd_scrub.c +++ b/lustre/osd-ldiskfs/osd_scrub.c @@ -2598,7 +2598,6 @@ int osd_scrub_setup(const struct lu_env *env, struct osd_device *dev, OBD_SET_CTXT_MAGIC(ctxt); ctxt->pwdmnt = dev->od_mnt; ctxt->pwd = dev->od_mnt->mnt_root; - ctxt->fs = get_ds(); init_waitqueue_head(&scrub->os_thread.t_ctl_waitq); init_rwsem(&scrub->os_rwsem); diff --git a/lustre/ptlrpc/sec_ctx.c b/lustre/ptlrpc/sec_ctx.c index 5667495752b6..0b3422be584f 100644 --- a/lustre/ptlrpc/sec_ctx.c +++ b/lustre/ptlrpc/sec_ctx.c @@ -57,7 +57,6 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx) ASSERT_CTXT_MAGIC(new_ctx->magic); OBD_SET_CTXT_MAGIC(save); - save->fs = get_fs(); LASSERT(ll_d_count(current->fs->pwd.dentry)); LASSERT(ll_d_count(new_ctx->pwd)); save->pwd = dget(current->fs->pwd.dentry); @@ -70,7 +69,6 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx) LASSERT(new_ctx->pwdmnt); current->fs->umask = 0; /* umask already applied on client */ - set_fs(new_ctx->fs); ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd); } EXPORT_SYMBOL(push_ctxt); @@ -89,7 +87,6 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx) LASSERTF(current->fs->pwd.mnt == new_ctx->pwdmnt, "%p != %p\n", current->fs->pwd.mnt, new_ctx->pwdmnt); - set_fs(saved->fs); ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd); dput(saved->pwd); -- 2.41.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor