]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre: remove unused lvfs code
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 9 Sep 2014 18:39:06 +0000 (13:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Sep 2014 21:45:01 +0000 (14:45 -0700)
Remove the unused "lvfs" functions obd_lvfs_fid2dentry(),
ll_lookup_one_len(), l_dput(), lustre_rename(), push_ctxt(), and
pop_ctxt(). Remove the unused members of struct lvfs_run_ctxt.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/linux/lvfs.h
drivers/staging/lustre/lustre/include/lvfs.h
drivers/staging/lustre/lustre/include/obd_class.h

index ddeb7de9bf016061582be2e5790905008f357233..786e779ed1927d9804f06b46c13bd69ba7afc2eb 100644 (file)
 #include <linux/sched.h>
 #include "lustre_compat25.h"
 
-#define LLOG_LVFS
-
-/* simple.c */
-
-struct lvfs_ucred {
-       kuid_t          luc_uid;
-       kgid_t          luc_gid;
-       kuid_t          luc_fsuid;
-       kgid_t          luc_fsgid;
-       kernel_cap_t    luc_cap;
-       __u32              luc_umask;
-       struct group_info      *luc_ginfo;
-       struct md_identity     *luc_identity;
-};
-
-struct lvfs_callback_ops {
-       struct dentry *(*l_fid2dentry)(__u64 id_ino, __u32 gen, __u64 gr, void *data);
-};
-
-#define OBD_RUN_CTXT_MAGIC      0xC0FFEEAA
-#define OBD_CTXT_DEBUG   /* development-only debugging */
 struct lvfs_run_ctxt {
-       struct vfsmount  *pwdmnt;
-       struct dentry      *pwd;
-       mm_segment_t         fs;
-       struct lvfs_ucred       luc;
-       int                   ngroups;
-       struct lvfs_callback_ops cb_ops;
-       struct group_info       *group_info;
        struct dt_device        *dt;
-#ifdef OBD_CTXT_DEBUG
-       __u32               magic;
-#endif
 };
 
-#ifdef OBD_CTXT_DEBUG
-#define OBD_SET_CTXT_MAGIC(ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC
-#else
-#define OBD_SET_CTXT_MAGIC(ctxt) do {} while (0)
-#endif
-
-
-int lustre_rename(struct dentry *dir, struct vfsmount *mnt, char *oldname,
-                 char *newname);
-
-static inline void l_dput(struct dentry *de)
-{
-       if (!de || IS_ERR(de))
-               return;
-       //shrink_dcache_parent(de);
-       LASSERT(d_count(de) > 0);
-       dput(de);
-}
-
-/* We need to hold the inode semaphore over the dcache lookup itself, or we
- * run the risk of entering the filesystem lookup path concurrently on SMP
- * systems, and instantiating two inodes for the same entry.  We still
- * protect against concurrent addition/removal races with the DLM locking.
- */
-static inline struct dentry *ll_lookup_one_len(const char *fid_name,
-                                              struct dentry *dparent,
-                                              int fid_namelen)
-{
-       struct dentry *dchild;
-
-       mutex_lock(&dparent->d_inode->i_mutex);
-       dchild = lookup_one_len(fid_name, dparent, fid_namelen);
-       mutex_unlock(&dparent->d_inode->i_mutex);
-
-       if (IS_ERR(dchild) || dchild->d_inode == NULL)
-               return dchild;
-
-       if (is_bad_inode(dchild->d_inode)) {
-               CERROR("bad inode returned %lu/%u\n",
-                      dchild->d_inode->i_ino, dchild->d_inode->i_generation);
-               dput(dchild);
-               dchild = ERR_PTR(-ENOENT);
-       }
-       return dchild;
-}
-
-
 #endif
index f91907ce52bb53ac64a37f91c78322e1e2e80b52..83bbce589919ad83c1f1450f246f7a39c4f5bd50 100644 (file)
 #ifndef __LVFS_H__
 #define __LVFS_H__
 
-#define LL_FID_NAMELEN (16 + 1 + 8 + 1)
-
 #include "../../include/linux/libcfs/libcfs.h"
 #include "linux/lvfs.h"
 
 #include "../../include/linux/libcfs/lucache.h"
 
-
-/* lvfs_linux.c */
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
-              struct lvfs_ucred *cred);
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
-             struct lvfs_ucred *cred);
 #endif
index 9030171a336f8d75553f057af4c476c5b1fe129e..882e40bd584cd010a329cdf4260f837916357a09 100644 (file)
@@ -1090,16 +1090,6 @@ static inline int obd_destroy_export(struct obd_export *exp)
        return 0;
 }
 
-static inline struct dentry *
-obd_lvfs_fid2dentry(struct obd_export *exp, struct ost_id *oi, __u32 gen)
-{
-       struct lvfs_run_ctxt *ctxt = &exp->exp_obd->obd_lvfs_ctxt;
-       LASSERT(exp->exp_obd);
-
-       return ctxt->cb_ops.l_fid2dentry(ostid_id(oi), gen, ostid_seq(oi),
-                                        exp->exp_obd);
-}
-
 /* @max_age is the oldest time in jiffies that we accept using a cached data.
  * If the cache is older than @max_age we will get a new value from the
  * target.  Use a value of "cfs_time_current() + HZ" to guarantee freshness. */