Commit 16e0631d authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging/lustre: remove linux/lustre_common.h

Expand the two uses of ll_inode_blksize() and remove the then
unnecessary header lustre/include/linux/lustre_common.h.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11495Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fdedd945
#ifndef LUSTRE_COMMON_H
#define LUSTRE_COMMON_H
#include <linux/sched.h>
static inline int cfs_cleanup_group_info(void)
{
struct group_info *ginfo;
ginfo = groups_alloc(0);
if (!ginfo)
return -ENOMEM;
set_current_groups(ginfo);
put_group_info(ginfo);
return 0;
}
#define ll_inode_blksize(a) (1<<(a)->i_blkbits)
#endif
......@@ -52,7 +52,6 @@
#include <linux/rbtree.h>
#include "../../include/linux/lustre_compat25.h"
#include "../../include/linux/lustre_common.h"
#include <linux/pagemap.h>
/* lprocfs.c */
......
......@@ -46,7 +46,6 @@
#endif
#include "lustre_compat25.h"
#include "lustre_common.h"
#include "lvfs_linux.h"
#define LLOG_LVFS
......
......@@ -991,7 +991,7 @@ int ll_inode_getattr(struct inode *inode, struct obdo *obdo,
CDEBUG(D_INODE, "objid "DOSTID" size %llu, blocks %llu,"
" blksize %lu\n", POSTID(oi), i_size_read(inode),
(unsigned long long)inode->i_blocks,
(unsigned long)ll_inode_blksize(inode));
1UL << inode->i_blkbits);
}
ccc_inode_lsm_put(inode, lsm);
return rc;
......
......@@ -86,7 +86,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid)
newvalid |= OBD_MD_FLBLOCKS;
}
if (valid & OBD_MD_FLBLKSZ) { /* optimal block size */
dst->o_blksize = ll_inode_blksize(src);
dst->o_blksize = 1 << src->i_blkbits;
newvalid |= OBD_MD_FLBLKSZ;
}
if (valid & OBD_MD_FLTYPE) {
......
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