diff options
author | John L. Hammond <john.hammond@intel.com> | 2014-04-27 13:07:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-27 10:31:00 -0700 |
commit | 2d95f10e50da3eadd3f0a54f8b4b03db37ce879c (patch) | |
tree | e4ca973df395b8912d1ce7c2925fe66a023bd3b1 /drivers/staging/lustre/lustre/llite/llite_lib.c | |
parent | staging/lustre/mdc: use cl_max_mds_md to pack getattr RPC (diff) | |
download | linux-dev-2d95f10e50da3eadd3f0a54f8b4b03db37ce879c.tar.xz linux-dev-2d95f10e50da3eadd3f0a54f8b4b03db37ce879c.zip |
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: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/9767
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/llite_lib.c')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_lib.c | 64 |
1 files changed, 5 insertions, 59 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index dbb14135b47f..7372986ac145 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -58,14 +58,8 @@ struct kmem_cache *ll_file_data_slab; struct proc_dir_entry *proc_lustre_fs_root; -LIST_HEAD(ll_super_blocks); -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 +static LIST_HEAD(ll_super_blocks); +static DEFINE_SPINLOCK(ll_sb_lock); #ifndef log2 #define log2(n) ffz(~(n)) @@ -143,7 +137,7 @@ static struct ll_sb_info *ll_init_sbi(void) 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); @@ -673,7 +667,7 @@ int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *lmmsize) return rc; } -void ll_dump_inode(struct inode *inode) +static void ll_dump_inode(struct inode *inode) { struct ll_d_hlist_node *tmp; int dentry_count = 0; @@ -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); @@ -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) { if (strncmp(opt, data, strlen(opt)) != 0) @@ -978,7 +948,6 @@ void ll_lli_init(struct ll_inode_info *lli) mutex_init(&lli->lli_readdir_mutex); lli->lli_opendir_key = NULL; lli->lli_sai = NULL; - lli->lli_def_acl = NULL; spin_lock_init(&lli->lli_sa_lock); lli->lli_opendir_pid = 0; } else { @@ -991,7 +960,6 @@ void ll_lli_init(struct ll_inode_info *lli) INIT_LIST_HEAD(&lli->lli_agl_list); lli->lli_agl_index = 0; lli->lli_async_rc = 0; - lli->lli_volatile = false; } mutex_init(&lli->lli_layout_mutex); } @@ -1190,28 +1158,6 @@ struct inode *ll_inode_from_resource_lock(struct ldlm_lock *lock) 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) { struct ll_inode_info *lli = ll_i2info(inode); |