Commit 2d95f10e authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging/lustre/llite: remove dead code

In llite remove unused declarations, parameters, types, and unused,
get-only, or set-only structure members. Add static and const
qualifiers to declarations where possible.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/9767
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675Reviewed-by: default avatarLai Siyao <lai.siyao@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c580836
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#include "../llite/llite_internal.h" #include "../llite/llite_internal.h"
const struct cl_req_operations ccc_req_ops; static const struct cl_req_operations ccc_req_ops;
/* /*
* ccc_ prefix stands for "Common Client Code". * ccc_ prefix stands for "Common Client Code".
...@@ -962,7 +962,7 @@ void ccc_req_attr_set(const struct lu_env *env, ...@@ -962,7 +962,7 @@ void ccc_req_attr_set(const struct lu_env *env,
JOBSTATS_JOBID_SIZE); JOBSTATS_JOBID_SIZE);
} }
const struct cl_req_operations ccc_req_ops = { static const struct cl_req_operations ccc_req_ops = {
.cro_attr_set = ccc_req_attr_set, .cro_attr_set = ccc_req_attr_set,
.cro_completion = ccc_req_completion .cro_completion = ccc_req_completion
}; };
......
...@@ -69,8 +69,7 @@ static void ll_release(struct dentry *de) ...@@ -69,8 +69,7 @@ static void ll_release(struct dentry *de)
ll_intent_release(lld->lld_it); ll_intent_release(lld->lld_it);
OBD_FREE(lld->lld_it, sizeof(*lld->lld_it)); OBD_FREE(lld->lld_it, sizeof(*lld->lld_it));
} }
LASSERT(lld->lld_cwd_count == 0);
LASSERT(lld->lld_mnt_count == 0);
de->d_fsdata = NULL; de->d_fsdata = NULL;
call_rcu(&lld->lld_rcu_head, free_dentry_data); call_rcu(&lld->lld_rcu_head, free_dentry_data);
} }
...@@ -82,8 +81,9 @@ static void ll_release(struct dentry *de) ...@@ -82,8 +81,9 @@ static void ll_release(struct dentry *de)
* an AST before calling d_revalidate_it(). The dentry still exists (marked * an AST before calling d_revalidate_it(). The dentry still exists (marked
* INVALID) so d_lookup() matches it, but we have no lock on it (so * INVALID) so d_lookup() matches it, but we have no lock on it (so
* lock_match() fails) and we spin around real_lookup(). */ * lock_match() fails) and we spin around real_lookup(). */
int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name) unsigned int len, const char *str,
const struct qstr *name)
{ {
if (len != name->len) if (len != name->len)
return 1; return 1;
...@@ -239,6 +239,7 @@ void ll_intent_release(struct lookup_intent *it) ...@@ -239,6 +239,7 @@ void ll_intent_release(struct lookup_intent *it)
/* We are still holding extra reference on a request, need to free it */ /* We are still holding extra reference on a request, need to free it */
if (it_disposition(it, DISP_ENQ_OPEN_REF)) if (it_disposition(it, DISP_ENQ_OPEN_REF))
ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */ ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */
if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */
ptlrpc_req_finished(it->d.lustre.it_data); ptlrpc_req_finished(it->d.lustre.it_data);
...@@ -316,15 +317,6 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry) ...@@ -316,15 +317,6 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
} }
} }
void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft)
{
struct lookup_intent *it = *itp;
if (!it || it->it_op == IT_GETXATTR)
it = *itp = deft;
}
static int ll_revalidate_dentry(struct dentry *dentry, static int ll_revalidate_dentry(struct dentry *dentry,
unsigned int lookup_flags) unsigned int lookup_flags)
{ {
...@@ -356,7 +348,7 @@ static int ll_revalidate_dentry(struct dentry *dentry, ...@@ -356,7 +348,7 @@ static int ll_revalidate_dentry(struct dentry *dentry,
/* /*
* Always trust cached dentries. Update statahead window if necessary. * Always trust cached dentries. Update statahead window if necessary.
*/ */
int ll_revalidate_nd(struct dentry *dentry, unsigned int flags) static int ll_revalidate_nd(struct dentry *dentry, unsigned int flags)
{ {
int rc; int rc;
...@@ -368,7 +360,7 @@ int ll_revalidate_nd(struct dentry *dentry, unsigned int flags) ...@@ -368,7 +360,7 @@ int ll_revalidate_nd(struct dentry *dentry, unsigned int flags)
} }
void ll_d_iput(struct dentry *de, struct inode *inode) static void ll_d_iput(struct dentry *de, struct inode *inode)
{ {
LASSERT(inode); LASSERT(inode);
if (!find_cbdata(inode)) if (!find_cbdata(inode))
...@@ -376,7 +368,7 @@ void ll_d_iput(struct dentry *de, struct inode *inode) ...@@ -376,7 +368,7 @@ void ll_d_iput(struct dentry *de, struct inode *inode)
iput(inode); iput(inode);
} }
struct dentry_operations ll_d_ops = { const struct dentry_operations ll_d_ops = {
.d_revalidate = ll_revalidate_nd, .d_revalidate = ll_revalidate_nd,
.d_release = ll_release, .d_release = ll_release,
.d_delete = ll_ddelete, .d_delete = ll_ddelete,
......
...@@ -632,7 +632,7 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx) ...@@ -632,7 +632,7 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
return rc; return rc;
} }
int ll_send_mgc_param(struct obd_export *mgc, char *string) static int ll_send_mgc_param(struct obd_export *mgc, char *string)
{ {
struct mgs_send_param *msp; struct mgs_send_param *msp;
int rc = 0; int rc = 0;
...@@ -1964,17 +1964,17 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin) ...@@ -1964,17 +1964,17 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
return ret; return ret;
} }
int ll_dir_open(struct inode *inode, struct file *file) static int ll_dir_open(struct inode *inode, struct file *file)
{ {
return ll_file_open(inode, file); return ll_file_open(inode, file);
} }
int ll_dir_release(struct inode *inode, struct file *file) static int ll_dir_release(struct inode *inode, struct file *file)
{ {
return ll_file_release(inode, file); return ll_file_release(inode, file);
} }
struct file_operations ll_dir_operations = { const struct file_operations ll_dir_operations = {
.llseek = ll_dir_seek, .llseek = ll_dir_seek,
.open = ll_dir_open, .open = ll_dir_open,
.release = ll_dir_release, .release = ll_dir_release,
......
...@@ -50,7 +50,17 @@ ...@@ -50,7 +50,17 @@
#include "cl_object.h" #include "cl_object.h"
struct ll_file_data *ll_file_data_get(void) static int
ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg);
static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
bool *lease_broken);
static enum llioc_iter
ll_iocontrol_call(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg, int *rcp);
static struct ll_file_data *ll_file_data_get(void)
{ {
struct ll_file_data *fd; struct ll_file_data *fd;
...@@ -247,7 +257,7 @@ int ll_md_real_close(struct inode *inode, fmode_t fmode) ...@@ -247,7 +257,7 @@ int ll_md_real_close(struct inode *inode, fmode_t fmode)
return rc; return rc;
} }
int ll_md_close(struct obd_export *md_exp, struct inode *inode, static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
struct file *file) struct file *file)
{ {
struct ll_file_data *fd = LUSTRE_FPRIVATE(file); struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
...@@ -482,7 +492,7 @@ static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it, ...@@ -482,7 +492,7 @@ static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it,
return md_set_open_replay_data(md_exp, och, it); return md_set_open_replay_data(md_exp, och, it);
} }
int ll_local_open(struct file *file, struct lookup_intent *it, static int ll_local_open(struct file *file, struct lookup_intent *it,
struct ll_file_data *fd, struct obd_client_handle *och) struct ll_file_data *fd, struct obd_client_handle *och)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
...@@ -733,8 +743,9 @@ static int ll_md_blocking_lease_ast(struct ldlm_lock *lock, ...@@ -733,8 +743,9 @@ static int ll_md_blocking_lease_ast(struct ldlm_lock *lock,
/** /**
* Acquire a lease and open the file. * Acquire a lease and open the file.
*/ */
struct obd_client_handle *ll_lease_open(struct inode *inode, struct file *file, static struct obd_client_handle *
fmode_t fmode, __u64 open_flags) ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
__u64 open_flags)
{ {
struct lookup_intent it = { .it_op = IT_OPEN }; struct lookup_intent it = { .it_op = IT_OPEN };
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
...@@ -862,13 +873,12 @@ struct obd_client_handle *ll_lease_open(struct inode *inode, struct file *file, ...@@ -862,13 +873,12 @@ struct obd_client_handle *ll_lease_open(struct inode *inode, struct file *file,
OBD_FREE_PTR(och); OBD_FREE_PTR(och);
return ERR_PTR(rc); return ERR_PTR(rc);
} }
EXPORT_SYMBOL(ll_lease_open);
/** /**
* Release lease and close the file. * Release lease and close the file.
* It will check if the lease has ever broken. * It will check if the lease has ever broken.
*/ */
int ll_lease_close(struct obd_client_handle *och, struct inode *inode, static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
bool *lease_broken) bool *lease_broken)
{ {
struct ldlm_lock *lock; struct ldlm_lock *lock;
...@@ -895,7 +905,6 @@ int ll_lease_close(struct obd_client_handle *och, struct inode *inode, ...@@ -895,7 +905,6 @@ int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
NULL); NULL);
return rc; return rc;
} }
EXPORT_SYMBOL(ll_lease_close);
/* Fills the obdo with the attributes for the lsm */ /* Fills the obdo with the attributes for the lsm */
static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp, static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp,
...@@ -1590,7 +1599,8 @@ static int ll_lov_getstripe(struct inode *inode, unsigned long arg) ...@@ -1590,7 +1599,8 @@ static int ll_lov_getstripe(struct inode *inode, unsigned long arg)
return rc; return rc;
} }
int ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg) static int
ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg)
{ {
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct ll_file_data *fd = LUSTRE_FPRIVATE(file); struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
...@@ -1710,7 +1720,7 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it) ...@@ -1710,7 +1720,7 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
* Get size for inode for which FIEMAP mapping is requested. * Get size for inode for which FIEMAP mapping is requested.
* Make the FIEMAP get_info call and returns the result. * Make the FIEMAP get_info call and returns the result.
*/ */
int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap, static int ll_do_fiemap(struct inode *inode, struct ll_user_fiemap *fiemap,
int num_bytes) int num_bytes)
{ {
struct obd_export *exp = ll_i2dtexp(inode); struct obd_export *exp = ll_i2dtexp(inode);
...@@ -2190,7 +2200,8 @@ static int ll_hsm_import(struct inode *inode, struct file *file, ...@@ -2190,7 +2200,8 @@ static int ll_hsm_import(struct inode *inode, struct file *file,
return rc; return rc;
} }
long ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long
ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
struct ll_file_data *fd = LUSTRE_FPRIVATE(file); struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
...@@ -2509,7 +2520,7 @@ long ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2509,7 +2520,7 @@ long ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
} }
loff_t ll_file_seek(struct file *file, loff_t offset, int origin) static loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
loff_t retval, eof = 0; loff_t retval, eof = 0;
...@@ -2533,7 +2544,7 @@ loff_t ll_file_seek(struct file *file, loff_t offset, int origin) ...@@ -2533,7 +2544,7 @@ loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
return retval; return retval;
} }
int ll_flush(struct file *file, fl_owner_t id) static int ll_flush(struct file *file, fl_owner_t id)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
...@@ -2670,7 +2681,8 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync) ...@@ -2670,7 +2681,8 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
return rc; return rc;
} }
int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) static int
ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
{ {
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
...@@ -2799,7 +2811,8 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2799,7 +2811,8 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
return rc; return rc;
} }
int ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock) static int
ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock)
{ {
return -ENOSYS; return -ENOSYS;
} }
...@@ -2891,8 +2904,7 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc) ...@@ -2891,8 +2904,7 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc)
return rc; return rc;
} }
int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it, static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
__u64 ibits)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
struct ptlrpc_request *req = NULL; struct ptlrpc_request *req = NULL;
...@@ -2987,13 +2999,12 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it, ...@@ -2987,13 +2999,12 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
return rc; return rc;
} }
int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it, static int ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
__u64 ibits)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
int rc; int rc;
rc = __ll_inode_revalidate_it(dentry, it, ibits); rc = __ll_inode_revalidate(dentry, ibits);
if (rc != 0) if (rc != 0)
return rc; return rc;
...@@ -3016,15 +3027,14 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it, ...@@ -3016,15 +3027,14 @@ int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
return rc; return rc;
} }
int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
struct lookup_intent *it, struct kstat *stat)
{ {
struct inode *inode = de->d_inode; struct inode *inode = de->d_inode;
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
int res = 0; int res = 0;
res = ll_inode_revalidate_it(de, it, MDS_INODELOCK_UPDATE | res = ll_inode_revalidate(de, MDS_INODELOCK_UPDATE |
MDS_INODELOCK_LOOKUP); MDS_INODELOCK_LOOKUP);
ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1); ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1);
...@@ -3051,14 +3061,8 @@ int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, ...@@ -3051,14 +3061,8 @@ int ll_getattr_it(struct vfsmount *mnt, struct dentry *de,
return 0; return 0;
} }
int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
{
struct lookup_intent it = { .it_op = IT_GETATTR };
return ll_getattr_it(mnt, de, &it, stat);
}
int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, static int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
__u64 start, __u64 len) __u64 start, __u64 len)
{ {
int rc; int rc;
...@@ -3091,7 +3095,7 @@ int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, ...@@ -3091,7 +3095,7 @@ int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
return rc; return rc;
} }
struct posix_acl * ll_get_acl(struct inode *inode, int type) struct posix_acl *ll_get_acl(struct inode *inode, int type)
{ {
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct posix_acl *acl = NULL; struct posix_acl *acl = NULL;
...@@ -3118,9 +3122,7 @@ int ll_inode_permission(struct inode *inode, int mask) ...@@ -3118,9 +3122,7 @@ int ll_inode_permission(struct inode *inode, int mask)
* need to do it before permission check. */ * need to do it before permission check. */
if (inode == inode->i_sb->s_root->d_inode) { if (inode == inode->i_sb->s_root->d_inode) {
struct lookup_intent it = { .it_op = IT_LOOKUP }; rc = __ll_inode_revalidate(inode->i_sb->s_root,
rc = __ll_inode_revalidate_it(inode->i_sb->s_root, &it,
MDS_INODELOCK_LOOKUP); MDS_INODELOCK_LOOKUP);
if (rc) if (rc)
return rc; return rc;
...@@ -3273,7 +3275,8 @@ void ll_iocontrol_unregister(void *magic) ...@@ -3273,7 +3275,8 @@ void ll_iocontrol_unregister(void *magic)
EXPORT_SYMBOL(ll_iocontrol_register); EXPORT_SYMBOL(ll_iocontrol_register);
EXPORT_SYMBOL(ll_iocontrol_unregister); EXPORT_SYMBOL(ll_iocontrol_unregister);
enum llioc_iter ll_iocontrol_call(struct inode *inode, struct file *file, static enum llioc_iter
ll_iocontrol_call(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg, int *rcp) unsigned int cmd, unsigned long arg, int *rcp)
{ {
enum llioc_iter ret = LLIOC_CONT; enum llioc_iter ret = LLIOC_CONT;
......
...@@ -68,6 +68,8 @@ static unsigned long long ll_capa_renewal_noent = 0; ...@@ -68,6 +68,8 @@ static unsigned long long ll_capa_renewal_noent = 0;
static unsigned long long ll_capa_renewal_failed = 0; static unsigned long long ll_capa_renewal_failed = 0;
static unsigned long long ll_capa_renewal_retries = 0; static unsigned long long ll_capa_renewal_retries = 0;
static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
static inline void update_capa_timer(struct obd_capa *ocapa, cfs_time_t expiry) static inline void update_capa_timer(struct obd_capa *ocapa, cfs_time_t expiry)
{ {
if (cfs_time_before(expiry, ll_capa_timer.expires) || if (cfs_time_before(expiry, ll_capa_timer.expires) ||
...@@ -515,7 +517,7 @@ static inline void delay_capa_renew(struct obd_capa *oc, cfs_time_t delay) ...@@ -515,7 +517,7 @@ static inline void delay_capa_renew(struct obd_capa *oc, cfs_time_t delay)
oc->c_expiry = cfs_time_add(oc->c_expiry, cfs_time_seconds(delay)); oc->c_expiry = cfs_time_add(oc->c_expiry, cfs_time_seconds(delay));
} }
int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa) static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa)
{ {
struct inode *inode = ocapa->u.cli.inode; struct inode *inode = ocapa->u.cli.inode;
int rc = 0; int rc = 0;
......
...@@ -58,14 +58,8 @@ ...@@ -58,14 +58,8 @@
struct kmem_cache *ll_file_data_slab; struct kmem_cache *ll_file_data_slab;
struct proc_dir_entry *proc_lustre_fs_root; struct proc_dir_entry *proc_lustre_fs_root;
LIST_HEAD(ll_super_blocks); static LIST_HEAD(ll_super_blocks);
DEFINE_SPINLOCK(ll_sb_lock); static DEFINE_SPINLOCK(ll_sb_lock);
#ifndef MS_HAS_NEW_AOPS
extern struct address_space_operations ll_aops;
#else
extern struct address_space_operations_ext ll_aops;
#endif
#ifndef log2 #ifndef log2
#define log2(n) ffz(~(n)) #define log2(n) ffz(~(n))
...@@ -143,7 +137,7 @@ static struct ll_sb_info *ll_init_sbi(void) ...@@ -143,7 +137,7 @@ static struct ll_sb_info *ll_init_sbi(void)
return sbi; return sbi;
} }
void ll_free_sbi(struct super_block *sb) static void ll_free_sbi(struct super_block *sb)
{ {
struct ll_sb_info *sbi = ll_s2sbi(sb); struct ll_sb_info *sbi = ll_s2sbi(sb);
...@@ -673,7 +667,7 @@ int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *lmmsize) ...@@ -673,7 +667,7 @@ int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *lmmsize)
return rc; return rc;
} }
void ll_dump_inode(struct inode *inode) static void ll_dump_inode(struct inode *inode)
{ {
struct ll_d_hlist_node *tmp; struct ll_d_hlist_node *tmp;
int dentry_count = 0; int dentry_count = 0;
...@@ -716,7 +710,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur) ...@@ -716,7 +710,7 @@ void lustre_dump_dentry(struct dentry *dentry, int recur)
} }
} }
void client_common_put_super(struct super_block *sb) static void client_common_put_super(struct super_block *sb)
{ {
struct ll_sb_info *sbi = ll_s2sbi(sb); struct ll_sb_info *sbi = ll_s2sbi(sb);
...@@ -765,30 +759,6 @@ void ll_kill_super(struct super_block *sb) ...@@ -765,30 +759,6 @@ void ll_kill_super(struct super_block *sb)
} }
} }
char *ll_read_opt(const char *opt, char *data)
{
char *value;
char *retval;
CDEBUG(D_SUPER, "option: %s, data %s\n", opt, data);
if (strncmp(opt, data, strlen(opt)))
return NULL;
value = strchr(data, '=');
if (value == NULL)
return NULL;
value++;
OBD_ALLOC(retval, strlen(value) + 1);
if (!retval) {
CERROR("out of memory!\n");
return NULL;
}
memcpy(retval, value, strlen(value)+1);
CDEBUG(D_SUPER, "Assigned option: %s, value %s\n", opt, retval);
return retval;
}
static inline int ll_set_opt(const char *opt, char *data, int fl) static inline int ll_set_opt(const char *opt, char *data, int fl)
{ {
if (strncmp(opt, data, strlen(opt)) != 0) if (strncmp(opt, data, strlen(opt)) != 0)
...@@ -978,7 +948,6 @@ void ll_lli_init(struct ll_inode_info *lli) ...@@ -978,7 +948,6 @@ void ll_lli_init(struct ll_inode_info *lli)
mutex_init(&lli->lli_readdir_mutex); mutex_init(&lli->lli_readdir_mutex);
lli->lli_opendir_key = NULL; lli->lli_opendir_key = NULL;
lli->lli_sai = NULL; lli->lli_sai = NULL;
lli->lli_def_acl = NULL;
spin_lock_init(&lli->lli_sa_lock); spin_lock_init(&lli->lli_sa_lock);
lli->lli_opendir_pid = 0; lli->lli_opendir_pid = 0;
} else { } else {
...@@ -991,7 +960,6 @@ void ll_lli_init(struct ll_inode_info *lli) ...@@ -991,7 +960,6 @@ void ll_lli_init(struct ll_inode_info *lli)
INIT_LIST_HEAD(&lli->lli_agl_list); INIT_LIST_HEAD(&lli->lli_agl_list);
lli->lli_agl_index = 0; lli->lli_agl_index = 0;
lli->lli_async_rc = 0; lli->lli_async_rc = 0;
lli->lli_volatile = false;
} }
mutex_init(&lli->lli_layout_mutex); mutex_init(&lli->lli_layout_mutex);
} }
...@@ -1190,28 +1158,6 @@ struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock) ...@@ -1190,28 +1158,6 @@ struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock)
return inode; return inode;
} }
struct inode *ll_inode_from_lock(struct ldlm_lock *lock)
{
struct inode *inode = NULL;
/* NOTE: we depend on atomic igrab() -bzzz */
lock_res_and_lock(lock);
if (lock->l_ast_data) {
struct ll_inode_info *lli = ll_i2info(lock->l_ast_data);
if (lli->lli_inode_magic == LLI_INODE_MAGIC) {
inode = igrab(lock->l_ast_data);
} else {
inode = lock->l_ast_data;
LDLM_DEBUG_LIMIT(inode->i_state & I_FREEING ? D_INFO :
D_WARNING, lock, "l_ast_data %p is "
"bogus: magic %08x", lock->l_ast_data,
lli->lli_inode_magic);
inode = NULL;
}
}
unlock_res_and_lock(lock);
return inode;
}
void ll_clear_inode(struct inode *inode) void ll_clear_inode(struct inode *inode)
{ {
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
......
...@@ -51,10 +51,7 @@ ...@@ -51,10 +51,7 @@
#include "llite_internal.h" #include "llite_internal.h"
#include <linux/lustre_compat25.h> #include <linux/lustre_compat25.h>
struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address, static const struct vm_operations_struct ll_file_vm_ops;
int *type);
static struct vm_operations_struct ll_file_vm_ops;
void policy_from_vma(ldlm_policy_data_t *policy, void policy_from_vma(ldlm_policy_data_t *policy,
struct vm_area_struct *vma, unsigned long addr, struct vm_area_struct *vma, unsigned long addr,
...@@ -97,10 +94,10 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr, ...@@ -97,10 +94,10 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
* \retval EINVAL if env can't allocated * \retval EINVAL if env can't allocated
* \return other error codes from cl_io_init. * \return other error codes from cl_io_init.
*/ */
struct cl_io *ll_fault_io_init(struct vm_area_struct *vma, static struct cl_io *
struct lu_env **env_ret, ll_fault_io_init(struct vm_area_struct *vma, struct lu_env **env_ret,
struct cl_env_nest *nest, struct cl_env_nest *nest, pgoff_t index,
pgoff_t index, unsigned long *ra_flags) unsigned long *ra_flags)
{ {
struct file *file = vma->vm_file; struct file *file = vma->vm_file;
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file->f_dentry->d_inode;
...@@ -446,14 +443,6 @@ static void ll_vm_close(struct vm_area_struct *vma) ...@@ -446,14 +443,6 @@ static void ll_vm_close(struct vm_area_struct *vma)
LASSERT(atomic_read(&vob->cob_mmap_cnt) >= 0); LASSERT(atomic_read(&vob->cob_mmap_cnt) >= 0);
} }
/* return the user space pointer that maps to a file offset via a vma */
static inline unsigned long file_to_user(struct vm_area_struct *vma, __u64 byte)
{
return vma->vm_start + (byte - ((__u64)vma->vm_pgoff << PAGE_CACHE_SHIFT));
}
/* XXX put nice comment here. talk about __free_pte -> dirty pages and /* XXX put nice comment here. talk about __free_pte -> dirty pages and
* nopage's reference passing to the pte */ * nopage's reference passing to the pte */
int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last) int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
...@@ -470,7 +459,7 @@ int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last) ...@@ -470,7 +459,7 @@ int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
return rc; return rc;
} }
static struct vm_operations_struct ll_file_vm_ops = { static const struct vm_operations_struct ll_file_vm_ops = {
.fault = ll_fault, .fault = ll_fault,
.page_mkwrite = ll_page_mkwrite, .page_mkwrite = ll_page_mkwrite,
.open = ll_vm_open, .open = ll_vm_open,
......
...@@ -122,9 +122,6 @@ struct lloop_device { ...@@ -122,9 +122,6 @@ struct lloop_device {
loff_t lo_offset; loff_t lo_offset;
loff_t lo_sizelimit; loff_t lo_sizelimit;
int lo_flags; int lo_flags;
int (*ioctl)(struct lloop_device *, int cmd,
unsigned long arg);
struct file *lo_backing_file; struct file *lo_backing_file;
struct block_device *lo_device; struct block_device *lo_device;
unsigned lo_blocksize; unsigned lo_blocksize;
...@@ -509,7 +506,6 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused, ...@@ -509,7 +506,6 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused,
lo->lo_device = bdev; lo->lo_device = bdev;
lo->lo_flags = lo_flags; lo->lo_flags = lo_flags;
lo->lo_backing_file = file; lo->lo_backing_file = file;
lo->ioctl = NULL;
lo->lo_sizelimit = 0; lo->lo_sizelimit = 0;
lo->old_gfp_mask = mapping_gfp_mask(mapping); lo->old_gfp_mask = mapping_gfp_mask(mapping);
mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
...@@ -568,7 +564,6 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, ...@@ -568,7 +564,6 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev,
down(&lo->lo_sem); down(&lo->lo_sem);
lo->lo_backing_file = NULL; lo->lo_backing_file = NULL;
lo->ioctl = NULL;
lo->lo_device = NULL; lo->lo_device = NULL;
lo->lo_offset = 0; lo->lo_offset = 0;
lo->lo_sizelimit = 0; lo->lo_sizelimit = 0;
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#include <obd_support.h> #include <obd_support.h>
#include "llite_internal.h" #include "llite_internal.h"
#include "vvp_internal.h"
/* /proc/lustre/llite mount point registration */ /* /proc/lustre/llite mount point registration */
extern struct file_operations vvp_dump_pgcache_file_ops;
static struct file_operations ll_rw_extents_stats_fops; static struct file_operations ll_rw_extents_stats_fops;
static struct file_operations ll_rw_extents_stats_pp_fops; static struct file_operations ll_rw_extents_stats_pp_fops;
static struct file_operations ll_rw_offset_stats_fops; static struct file_operations ll_rw_offset_stats_fops;
...@@ -837,7 +837,7 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = { ...@@ -837,7 +837,7 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
#define MAX_STRING_SIZE 128 #define MAX_STRING_SIZE 128
struct llite_file_opcode { static const struct llite_file_opcode {
__u32 opcode; __u32 opcode;
__u32 type; __u32 type;
const char *opname; const char *opname;
......
...@@ -75,14 +75,6 @@ static int ll_d_mountpoint(struct dentry *dparent, struct dentry *dchild, ...@@ -75,14 +75,6 @@ static int ll_d_mountpoint(struct dentry *dparent, struct dentry *dchild,
return mounted; return mounted;
} }
int ll_unlock(__u32 mode, struct lustre_handle *lockh)
{
ldlm_lock_decref(lockh, mode);
return 0;
}
/* called from iget5_locked->find_inode() under inode_hash_lock spinlock */ /* called from iget5_locked->find_inode() under inode_hash_lock spinlock */
static int ll_test_inode(struct inode *inode, void *opaque) static int ll_test_inode(struct inode *inode, void *opaque)
{ {
...@@ -433,12 +425,10 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de) ...@@ -433,12 +425,10 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
return de; return de;
} }
int ll_lookup_it_finish(struct ptlrpc_request *request, static int ll_lookup_it_finish(struct ptlrpc_request *request,
struct lookup_intent *it, void *data) struct lookup_intent *it,
struct inode *parent, struct dentry **de)
{ {
struct it_cb_data *icbd = data;
struct dentry **de = icbd->icbd_childp;
struct inode *parent = icbd->icbd_parent;
struct inode *inode = NULL; struct inode *inode = NULL;
__u64 bits = 0; __u64 bits = 0;
int rc; int rc;
...@@ -513,7 +503,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -513,7 +503,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
struct dentry *save = dentry, *retval; struct dentry *save = dentry, *retval;
struct ptlrpc_request *req = NULL; struct ptlrpc_request *req = NULL;
struct md_op_data *op_data; struct md_op_data *op_data;
struct it_cb_data icbd;
__u32 opc; __u32 opc;
int rc; int rc;
...@@ -527,7 +516,8 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -527,7 +516,8 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
if (d_mountpoint(dentry)) if (d_mountpoint(dentry))
CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it)); CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it));
ll_frob_intent(&it, &lookup_it); if (it == NULL || it->it_op == IT_GETXATTR)
it = &lookup_it;
if (it->it_op == IT_GETATTR) { if (it->it_op == IT_GETATTR) {
rc = ll_statahead_enter(parent, &dentry, 0); rc = ll_statahead_enter(parent, &dentry, 0);
...@@ -538,9 +528,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -538,9 +528,6 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
} }
} }
icbd.icbd_childp = &dentry;
icbd.icbd_parent = parent;
if (it->it_op & IT_CREAT) if (it->it_op & IT_CREAT)
opc = LUSTRE_OPC_CREATE; opc = LUSTRE_OPC_CREATE;
else else
...@@ -562,7 +549,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -562,7 +549,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
if (rc < 0) if (rc < 0)
GOTO(out, retval = ERR_PTR(rc)); GOTO(out, retval = ERR_PTR(rc));
rc = ll_lookup_it_finish(req, it, &icbd); rc = ll_lookup_it_finish(req, it, parent, &dentry);
if (rc != 0) { if (rc != 0) {
ll_intent_release(it); ll_intent_release(it);
GOTO(out, retval = ERR_PTR(rc)); GOTO(out, retval = ERR_PTR(rc));
...@@ -697,10 +684,7 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -697,10 +684,7 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
/* We depend on "mode" being set with the proper file type/umask by now */ /* We depend on "mode" being set with the proper file type/umask by now */
static struct inode *ll_create_node(struct inode *dir, const char *name, static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
int namelen, const void *data, int datalen,
int mode, __u64 extra,
struct lookup_intent *it)
{ {
struct inode *inode = NULL; struct inode *inode = NULL;
struct ptlrpc_request *request = NULL; struct ptlrpc_request *request = NULL;
...@@ -757,14 +741,10 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode, ...@@ -757,14 +741,10 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
if (rc) if (rc)
return rc; return rc;
inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len, inode = ll_create_node(dir, it);
NULL, 0, mode, 0, it);
if (IS_ERR(inode)) if (IS_ERR(inode))
return PTR_ERR(inode); return PTR_ERR(inode);
if (filename_is_volatile(dentry->d_name.name, dentry->d_name.len, NULL))
ll_i2info(inode)->lli_volatile = true;
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
return 0; return 0;
} }
...@@ -1238,7 +1218,7 @@ static int ll_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1238,7 +1218,7 @@ static int ll_rename(struct inode *old_dir, struct dentry *old_dentry,
return err; return err;
} }
struct inode_operations ll_dir_inode_operations = { const struct inode_operations ll_dir_inode_operations = {
.mknod = ll_mknod, .mknod = ll_mknod,
.atomic_open = ll_atomic_open, .atomic_open = ll_atomic_open,
.lookup = ll_lookup_nd, .lookup = ll_lookup_nd,
...@@ -1260,7 +1240,7 @@ struct inode_operations ll_dir_inode_operations = { ...@@ -1260,7 +1240,7 @@ struct inode_operations ll_dir_inode_operations = {
.get_acl = ll_get_acl, .get_acl = ll_get_acl,
}; };
struct inode_operations ll_special_inode_operations = { const struct inode_operations ll_special_inode_operations = {
.setattr = ll_setattr, .setattr = ll_setattr,
.getattr = ll_getattr, .getattr = ll_getattr,
.permission = ll_inode_permission, .permission = ll_inode_permission,
......
...@@ -77,7 +77,7 @@ static inline void free_ll_remote_perm(struct ll_remote_perm *lrp) ...@@ -77,7 +77,7 @@ static inline void free_ll_remote_perm(struct ll_remote_perm *lrp)
OBD_SLAB_FREE(lrp, ll_remote_perm_cachep, sizeof(*lrp)); OBD_SLAB_FREE(lrp, ll_remote_perm_cachep, sizeof(*lrp));
} }
struct hlist_head *alloc_rmtperm_hash(void) static struct hlist_head *alloc_rmtperm_hash(void)
{ {
struct hlist_head *hash; struct hlist_head *hash;
int i; int i;
......
...@@ -77,12 +77,6 @@ static void ll_cl_fini(struct ll_cl_context *lcc) ...@@ -77,12 +77,6 @@ static void ll_cl_fini(struct ll_cl_context *lcc)
cl_page_put(env, page); cl_page_put(env, page);
} }
if (io && lcc->lcc_created) {
cl_io_end(env, io);
cl_io_unlock(env, io);
cl_io_iter_fini(env, io);
cl_io_fini(env, io);
}
cl_env_put(env, &lcc->lcc_refcheck); cl_env_put(env, &lcc->lcc_refcheck);
} }
...@@ -167,7 +161,6 @@ static struct ll_cl_context *ll_cl_init(struct file *file, ...@@ -167,7 +161,6 @@ static struct ll_cl_context *ll_cl_init(struct file *file,
} }
} else } else
result = io->ci_result; result = io->ci_result;
lcc->lcc_created = 1;
} }
lcc->lcc_io = io; lcc->lcc_io = io;
......
...@@ -529,9 +529,9 @@ static int ll_write_end(struct file *file, struct address_space *mapping, ...@@ -529,9 +529,9 @@ static int ll_write_end(struct file *file, struct address_space *mapping,
} }
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
int ll_migratepage(struct address_space *mapping, static int ll_migratepage(struct address_space *mapping,
struct page *newpage, struct page *page struct page *newpage, struct page *page,
, enum migrate_mode mode enum migrate_mode mode
) )
{ {
/* Always fail page migration until we have a proper implementation */ /* Always fail page migration until we have a proper implementation */
...@@ -540,9 +540,8 @@ int ll_migratepage(struct address_space *mapping, ...@@ -540,9 +540,8 @@ int ll_migratepage(struct address_space *mapping,
#endif #endif
#ifndef MS_HAS_NEW_AOPS #ifndef MS_HAS_NEW_AOPS
struct address_space_operations ll_aops = { const struct address_space_operations ll_aops = {
.readpage = ll_readpage, .readpage = ll_readpage,
// .readpages = ll_readpages,
.direct_IO = ll_direct_IO_26, .direct_IO = ll_direct_IO_26,
.writepage = ll_writepage, .writepage = ll_writepage,
.writepages = ll_writepages, .writepages = ll_writepages,
...@@ -554,10 +553,9 @@ struct address_space_operations ll_aops = { ...@@ -554,10 +553,9 @@ struct address_space_operations ll_aops = {
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
.migratepage = ll_migratepage, .migratepage = ll_migratepage,
#endif #endif
.bmap = NULL
}; };
#else #else
struct address_space_operations_ext ll_aops = { const struct address_space_operations_ext ll_aops = {
.orig_aops.readpage = ll_readpage, .orig_aops.readpage = ll_readpage,
// .orig_aops.readpages = ll_readpages, // .orig_aops.readpages = ll_readpages,
.orig_aops.direct_IO = ll_direct_IO_26, .orig_aops.direct_IO = ll_direct_IO_26,
...@@ -571,7 +569,6 @@ struct address_space_operations_ext ll_aops = { ...@@ -571,7 +569,6 @@ struct address_space_operations_ext ll_aops = {
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
.orig_aops.migratepage = ll_migratepage, .orig_aops.migratepage = ll_migratepage,
#endif #endif
.orig_aops.bmap = NULL,
.write_begin = ll_write_begin, .write_begin = ll_write_begin,
.write_end = ll_write_end .write_end = ll_write_end
}; };
......
...@@ -1230,9 +1230,7 @@ static int ll_statahead_thread(void *arg) ...@@ -1230,9 +1230,7 @@ static int ll_statahead_thread(void *arg)
*/ */
ll_release_page(page, le32_to_cpu(dp->ldp_flags) & ll_release_page(page, le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE); LDF_COLLIDE);
sai->sai_in_readpage = 1;
page = ll_get_dir_page(dir, pos, &chain); page = ll_get_dir_page(dir, pos, &chain);
sai->sai_in_readpage = 0;
} else { } else {
LASSERT(le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE); LASSERT(le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE);
ll_release_page(page, 1); ll_release_page(page, 1);
...@@ -1563,12 +1561,6 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, ...@@ -1563,12 +1561,6 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
return entry ? 1 : -EAGAIN; return entry ? 1 : -EAGAIN;
} }
/* if statahead is busy in readdir, help it do post-work */
while (!ll_sa_entry_stated(entry) &&
sai->sai_in_readpage &&
!sa_received_empty(sai))
ll_post_statahead(sai);
if (!ll_sa_entry_stated(entry)) { if (!ll_sa_entry_stated(entry)) {
sai->sai_index_wait = entry->se_index; sai->sai_index_wait = entry->se_index;
lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(30), NULL, lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(30), NULL,
......
...@@ -72,7 +72,7 @@ static void ll_destroy_inode(struct inode *inode) ...@@ -72,7 +72,7 @@ static void ll_destroy_inode(struct inode *inode)
call_rcu(&inode->i_rcu, ll_inode_destroy_callback); call_rcu(&inode->i_rcu, ll_inode_destroy_callback);
} }
int ll_init_inodecache(void) static int ll_init_inodecache(void)
{ {
ll_inode_cachep = kmem_cache_create("lustre_inode_cache", ll_inode_cachep = kmem_cache_create("lustre_inode_cache",
sizeof(struct ll_inode_info), sizeof(struct ll_inode_info),
...@@ -82,7 +82,7 @@ int ll_init_inodecache(void) ...@@ -82,7 +82,7 @@ int ll_init_inodecache(void)
return 0; return 0;
} }
void ll_destroy_inodecache(void) static void ll_destroy_inodecache(void)
{ {
kmem_cache_destroy(ll_inode_cachep); kmem_cache_destroy(ll_inode_cachep);
} }
...@@ -103,9 +103,6 @@ MODULE_ALIAS_FS("lustre"); ...@@ -103,9 +103,6 @@ MODULE_ALIAS_FS("lustre");
void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg)); void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg));
int vvp_global_init(void);
void vvp_global_fini(void);
static int __init init_lustre_lite(void) static int __init init_lustre_lite(void)
{ {
int i, rc, seed[2]; int i, rc, seed[2];
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <obd.h> #include <obd.h>
#include <lustre_lite.h> #include <lustre_lite.h>
#include "llite_internal.h"
#include "vvp_internal.h" #include "vvp_internal.h"
/***************************************************************************** /*****************************************************************************
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
* "llite_" (var. "ll_") prefix. * "llite_" (var. "ll_") prefix.
*/ */
struct kmem_cache *vvp_thread_kmem; static struct kmem_cache *vvp_thread_kmem;
static struct kmem_cache *vvp_session_kmem; static struct kmem_cache *vvp_session_kmem;
static struct lu_kmem_descr vvp_caches[] = { static struct lu_kmem_descr vvp_caches[] = {
{ {
...@@ -536,7 +536,7 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) ...@@ -536,7 +536,7 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp)
return result; return result;
} }
struct file_operations vvp_dump_pgcache_file_ops = { const struct file_operations vvp_dump_pgcache_file_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = vvp_dump_pgcache_seq_open, .open = vvp_dump_pgcache_seq_open,
.read = seq_read, .read = seq_read,
......
...@@ -57,6 +57,6 @@ struct lu_object *vvp_object_alloc(const struct lu_env *env, ...@@ -57,6 +57,6 @@ struct lu_object *vvp_object_alloc(const struct lu_env *env,
struct ccc_object *cl_inode2ccc(struct inode *inode); struct ccc_object *cl_inode2ccc(struct inode *inode);
extern struct kmem_cache *vvp_thread_kmem; extern const struct file_operations vvp_dump_pgcache_file_ops;
#endif /* VVP_INTERNAL_H */ #endif /* VVP_INTERNAL_H */
...@@ -190,7 +190,7 @@ static void vvp_io_fault_fini(const struct lu_env *env, ...@@ -190,7 +190,7 @@ static void vvp_io_fault_fini(const struct lu_env *env,
vvp_io_fini(env, ios); vvp_io_fini(env, ios);
} }
enum cl_lock_mode vvp_mode_from_vma(struct vm_area_struct *vma) static enum cl_lock_mode vvp_mode_from_vma(struct vm_area_struct *vma)
{ {
/* /*
* we only want to hold PW locks if the mmap() can generate * we only want to hold PW locks if the mmap() can generate
......
...@@ -120,7 +120,7 @@ static int vvp_attr_set(const struct lu_env *env, struct cl_object *obj, ...@@ -120,7 +120,7 @@ static int vvp_attr_set(const struct lu_env *env, struct cl_object *obj,
return 0; return 0;
} }
int vvp_conf_set(const struct lu_env *env, struct cl_object *obj, static int vvp_conf_set(const struct lu_env *env, struct cl_object *obj,
const struct cl_object_conf *conf) const struct cl_object_conf *conf)
{ {
struct ll_inode_info *lli = ll_i2info(conf->coc_inode); struct ll_inode_info *lli = ll_i2info(conf->coc_inode);
......
...@@ -232,7 +232,7 @@ static int ll_xattr_cache_list(struct list_head *cache, ...@@ -232,7 +232,7 @@ static int ll_xattr_cache_list(struct list_head *cache,
* \retval 0 @cache is not initialized * \retval 0 @cache is not initialized
* \retval 1 @cache is initialized * \retval 1 @cache is initialized
*/ */
int ll_xattr_cache_valid(struct ll_inode_info *lli) static int ll_xattr_cache_valid(struct ll_inode_info *lli)
{ {
return !!(lli->lli_flags & LLIF_XATTR_CACHE); return !!(lli->lli_flags & LLIF_XATTR_CACHE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment