From: "John L. Hammond" <john.hammond@intel.com>
To: <greg@kroah.com>, <andreas.dilger@intel.com>, <oleg.drokin@intel.com>
Cc: <linux-kernel@vger.kernel.org>,
"John L. Hammond" <john.hammond@intel.com>
Subject: [PATCH 2/7] staging/lustre: remove linux/lustre_common.h
Date: Tue, 9 Sep 2014 13:39:03 -0500 [thread overview]
Message-ID: <1410287948-13168-3-git-send-email-john.hammond@intel.com> (raw)
In-Reply-To: <1410287948-13168-1-git-send-email-john.hammond@intel.com>
From: "John L. Hammond" <john.hammond@intel.com>
Expand the two uses of ll_inode_blksize() and remove the then
unnecessary header lustre/include/linux/lustre_common.h.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11495
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../lustre/lustre/include/linux/lustre_common.h | 22 --------------------
.../lustre/lustre/include/linux/lustre_lite.h | 1 -
drivers/staging/lustre/lustre/include/linux/lvfs.h | 1 -
drivers/staging/lustre/lustre/llite/file.c | 2 +-
drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +-
5 files changed, 2 insertions(+), 26 deletions(-)
delete mode 100644 drivers/staging/lustre/lustre/include/linux/lustre_common.h
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_common.h b/drivers/staging/lustre/lustre/include/linux/lustre_common.h
deleted file mode 100644
index d1783a3..0000000
--- a/drivers/staging/lustre/lustre/include/linux/lustre_common.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#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
diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h
index 99eed49..a7658a9 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h
@@ -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 */
diff --git a/drivers/staging/lustre/lustre/include/linux/lvfs.h b/drivers/staging/lustre/lustre/include/linux/lvfs.h
index c446375..e4cdb45 100644
--- a/drivers/staging/lustre/lustre/include/linux/lvfs.h
+++ b/drivers/staging/lustre/lustre/include/linux/lvfs.h
@@ -46,7 +46,6 @@
#endif
#include "lustre_compat25.h"
-#include "lustre_common.h"
#include "lvfs_linux.h"
#define LLOG_LVFS
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 10a1475..3a57be4 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -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;
diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
index bdc00ea..8b4b8ae 100644
--- a/drivers/staging/lustre/lustre/obdclass/obdo.c
+++ b/drivers/staging/lustre/lustre/obdclass/obdo.c
@@ -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) {
--
1.7.9.5
next prev parent reply other threads:[~2014-09-09 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 18:39 [PATCH 0/7] staging/lustre: remove the lvfs layer John L. Hammond
2014-09-09 18:39 ` [PATCH 1/7] staging/lustre/lvfs: " John L. Hammond
2014-09-09 18:39 ` John L. Hammond [this message]
2014-09-09 18:39 ` [PATCH 3/7] staging/lustre: remove portals_compat25.h John L. Hammond
2014-09-09 18:39 ` [PATCH 4/7] staging/lustre: remove lvfs_linux.h John L. Hammond
2014-09-09 18:39 ` [PATCH 5/7] staging/lustre: remove unused lvfs code John L. Hammond
2014-09-09 18:39 ` [PATCH 6/7] staging/lustre/libcfs: remove upcall cache John L. Hammond
2014-09-09 18:39 ` [PATCH 7/7] staging/lustre: remove lvfs.h John L. Hammond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410287948-13168-3-git-send-email-john.hammond@intel.com \
--to=john.hammond@intel.com \
--cc=andreas.dilger@intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome