From: James Simmons <[email protected]> struct fs_struct has been using struct path for working dirs since v2.6.26.
We can remove the test and the dead code. Lustre-change: http://review.whamcloud.com/5359 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2800 Signed-off-by: Jeff Mahoney <[email protected]> Signed-off-by: James Simmons <[email protected]> Reviewed-by: Bob Glossman <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Andreas Dilger <[email protected]> --- .../lustre/lustre/include/linux/lustre_compat25.h | 5 ----- drivers/staging/lustre/lustre/lvfs/lvfs_linux.c | 14 +++++++------- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h index 2e1b7f1..8e1505a 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h @@ -111,11 +111,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt, #define cfs_bio_io_error(a,b) bio_io_error((a)) #define cfs_bio_endio(a,b,c) bio_endio((a),(c)) -#define cfs_fs_pwd(fs) ((fs)->pwd.dentry) -#define cfs_fs_mnt(fs) ((fs)->pwd.mnt) -#define cfs_path_put(nd) path_put(&(nd)->path) - - #ifndef SLAB_DESTROY_BY_RCU #define SLAB_DESTROY_BY_RCU 0 #endif diff --git a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c index 1ef06fe..86b09a8 100644 --- a/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c +++ b/drivers/staging/lustre/lustre/lvfs/lvfs_linux.c @@ -119,10 +119,10 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, OBD_SET_CTXT_MAGIC(save); save->fs = get_fs(); - LASSERT(d_count(cfs_fs_pwd(current->fs))); + LASSERT(d_count(current->fs->pwd.dentry)); LASSERT(d_count(new_ctx->pwd)); - save->pwd = dget(cfs_fs_pwd(current->fs)); - save->pwdmnt = mntget(cfs_fs_mnt(current->fs)); + save->pwd = dget(current->fs->pwd.dentry); + save->pwdmnt = mntget(current->fs->pwd.mnt); save->luc.luc_umask = current_umask(); save->ngroups = current_cred()->group_info->ngroups; @@ -170,10 +170,10 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, ASSERT_CTXT_MAGIC(saved->magic); ASSERT_KERNEL_CTXT("popping non-kernel context!\n"); - LASSERTF(cfs_fs_pwd(current->fs) == new_ctx->pwd, "%p != %p\n", - cfs_fs_pwd(current->fs), new_ctx->pwd); - LASSERTF(cfs_fs_mnt(current->fs) == new_ctx->pwdmnt, "%p != %p\n", - cfs_fs_mnt(current->fs), new_ctx->pwdmnt); + LASSERTF(current->fs->pwd.dentry == new_ctx->pwd, "%p != %p\n", + current->fs->pwd.dentry, new_ctx->pwd); + 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); diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c index 6cc3f23..6b4c971 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c @@ -1015,7 +1015,7 @@ int sptlrpc_target_local_copy_conf(struct obd_device *obd, push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - dentry = ll_lookup_one_len(MOUNT_CONFIGS_DIR, cfs_fs_pwd(current->fs), + dentry = ll_lookup_one_len(MOUNT_CONFIGS_DIR, current->fs->pwd.dentry, strlen(MOUNT_CONFIGS_DIR)); if (IS_ERR(dentry)) { rc = PTR_ERR(dentry); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

