mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH v2 38/46] staging/lustre/llite: Move ll_dirent_type_get and make it static
Date: Wed, 30 Mar 2016 19:48:59 -0400	[thread overview]
Message-ID: <1459381747-2886687-39-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1459381747-2886687-1-git-send-email-green@linuxhacker.ru>

From: Oleg Drokin <green@linuxhacker.ru>

ll_dirent_type_get is only used in one place in llite/dir.c,
so move it there.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/llite/dir.c          | 22 ++++++++++++++++++++++
 drivers/staging/lustre/lustre/llite/lcommon_cl.c   | 22 ----------------------
 drivers/staging/lustre/lustre/llite/vvp_internal.h |  1 -
 3 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 2ca4b0e..b085fb4 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -469,6 +469,28 @@ fail:
 	goto out_unlock;
 }
 
+/**
+ * return IF_* type for given lu_dirent entry.
+ * IF_* flag shld be converted to particular OS file type in
+ * platform llite module.
+ */
+static __u16 ll_dirent_type_get(struct lu_dirent *ent)
+{
+	__u16 type = 0;
+	struct luda_type *lt;
+	int len = 0;
+
+	if (le32_to_cpu(ent->lde_attrs) & LUDA_TYPE) {
+		const unsigned int align = sizeof(struct luda_type) - 1;
+
+		len = le16_to_cpu(ent->lde_namelen);
+		len = (len + align) & ~align;
+		lt = (void *)ent->lde_name + len;
+		type = IFTODT(le16_to_cpu(lt->lt_type));
+	}
+	return type;
+}
+
 int ll_dir_read(struct inode *inode, struct dir_context *ctx)
 {
 	struct ll_inode_info *info       = ll_i2info(inode);
diff --git a/drivers/staging/lustre/lustre/llite/lcommon_cl.c b/drivers/staging/lustre/lustre/llite/lcommon_cl.c
index 164737a..6c00715 100644
--- a/drivers/staging/lustre/lustre/llite/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/llite/lcommon_cl.c
@@ -280,28 +280,6 @@ void cl_inode_fini(struct inode *inode)
 }
 
 /**
- * return IF_* type for given lu_dirent entry.
- * IF_* flag shld be converted to particular OS file type in
- * platform llite module.
- */
-__u16 ll_dirent_type_get(struct lu_dirent *ent)
-{
-	__u16 type = 0;
-	struct luda_type *lt;
-	int len = 0;
-
-	if (le32_to_cpu(ent->lde_attrs) & LUDA_TYPE) {
-		const unsigned int align = sizeof(struct luda_type) - 1;
-
-		len = le16_to_cpu(ent->lde_namelen);
-		len = (len + align) & ~align;
-		lt = (void *)ent->lde_name + len;
-		type = IFTODT(le16_to_cpu(lt->lt_type));
-	}
-	return type;
-}
-
-/**
  * build inode number from passed @fid
  */
 __u64 cl_fid_build_ino(const struct lu_fid *fid, int api32)
diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h
index fe29fb5..06e2726 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_internal.h
+++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h
@@ -376,7 +376,6 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md);
 void cl_inode_fini(struct inode *inode);
 int cl_local_size(struct inode *inode);
 
-__u16 ll_dirent_type_get(struct lu_dirent *ent);
 __u64 cl_fid_build_ino(const struct lu_fid *fid, int api32);
 __u32 cl_fid_build_gen(const struct lu_fid *fid);
 
-- 
2.1.0

  parent reply	other threads:[~2016-03-30 23:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 23:48 [PATCH v2 00/46] Lustre IO stack simplifications and cleanups green
2016-03-30 23:48 ` [PATCH v2 01/46] staging/lustre/obdclass: limit lu_site hash table size green
2016-03-30 23:48 ` [PATCH v2 02/46] staging/lustre: Get rid of CFS_PAGE_MASK green
2016-03-30 23:48 ` [PATCH v2 03/46] staging/lustre: merge lclient/*.c into llite/ green
2016-03-30 23:48 ` [PATCH v2 04/46] staging/lustre: Reintroduce global env list green
2016-03-30 23:48 ` [PATCH v2 05/46] staging/lustre/osc: Adjustment on osc LRU for performance green
2016-03-30 23:48 ` [PATCH v2 06/46] staging/lustre/osc: to drop LRU pages with cl_lru_work green
2016-03-30 23:48 ` [PATCH v2 07/46] staging/lustre/clio: collapse layer of cl_page green
2016-03-30 23:48 ` [PATCH v2 08/46] staging/lustre/obdclass: Add a preallocated percpu cl_env green
2016-03-30 23:48 ` [PATCH v2 09/46] staging/lustre/clio: add pages into writeback cache in batches green
2016-03-30 23:48 ` [PATCH v2 10/46] staging/lustre/osc: add weight function for DLM lock green
2016-03-30 23:48 ` [PATCH v2 11/46] staging/lustre/clio: remove stackable cl_page completely green
2016-03-30 23:48 ` [PATCH v2 12/46] staging/lustre/clio: optimize read ahead code green
2016-03-30 23:48 ` [PATCH v2 13/46] staging/lustre/llite: remove lli_lvb green
2016-03-30 23:48 ` [PATCH v2 14/46] staging/lustre/lmv: remove lmv_init_{lock,unlock}() green
2016-03-30 23:48 ` [PATCH v2 15/46] staging/lustre/obd: remove struct client_obd_lock green
2016-03-30 23:48 ` [PATCH v2 16/46] staging/lustre/llite: remove some cl wrappers green
2016-03-30 23:48 ` [PATCH v2 17/46] staging/lustre: Remove struct ll_iattr green
2016-03-30 23:48 ` [PATCH v2 18/46] staging/lustre/clio: generalize cl_sync_io green
2016-03-30 23:48 ` [PATCH v2 19/46] staging/lustre/clio: cl_lock simplification green
2016-03-30 23:48 ` [PATCH v2 20/46] staging/lustre: update comments after " green
2016-03-30 23:48 ` [PATCH v2 21/46] staging/lustre/llite: clip page correctly for vvp_io_commit_sync green
2016-03-30 23:48 ` [PATCH v2 22/46] staging/lustre/llite: deadlock for page write green
2016-03-30 23:48 ` [PATCH v2 23/46] staging/lustre/llite: make sure we do cl_page_clip on the last page green
2016-03-30 23:48 ` [PATCH v2 24/46] staging/lustre/llite: merge lclient.h into llite/vvp_internal.h green
2016-03-30 23:48 ` [PATCH v2 25/46] staging/lustre/llite: rename ccc_device to vvp_device green
2016-03-30 23:48 ` [PATCH v2 26/46] staging/lustre/llite: rename ccc_object to vvp_object green
2016-03-30 23:48 ` [PATCH v2 27/46] staging/lustre/llite: rename ccc_page to vvp_page green
2016-03-30 23:48 ` [PATCH v2 28/46] staging/lustre/llite: rename ccc_lock to vvp_lock green
2016-03-30 23:48 ` [PATCH v2 29/46] staging/lustre:llite: remove struct ll_ra_read green
2016-03-30 23:48 ` [PATCH v2 30/46] staging/lustre/llite: merge ccc_io and vvp_io green
2016-03-30 23:48 ` [PATCH v2 31/46] staging/lustre/llite: use vui prefix for struct vvp_io members green
2016-03-30 23:48 ` [PATCH v2 32/46] staging/lustre/llite: move vvp_io functions to vvp_io.c green
2016-03-30 23:48 ` [PATCH v2 33/46] staging/lustre/llite: rename ccc_req to vvp_req green
2016-03-30 23:48 ` [PATCH v2 34/46] staging/lustre/llite: Rename struct ccc_grouplock to ll_grouplock green
2016-03-30 23:48 ` [PATCH v2 35/46] staging/lustre/llite: Rename struct vvp_thread_info to ll_thread_info green
2016-03-30 23:48 ` [PATCH v2 36/46] staging/lustre/llite: rename struct ccc_thread_info to vvp_thread_info green
2016-03-30 23:48 ` [PATCH v2 37/46] staging/lustre/llite: Remove ccc_global_{init,fini}() green
2016-03-30 23:48 ` green [this message]
2016-03-30 23:49 ` [PATCH v2 39/46] staging/lustre/llite: Move several declarations to llite_internal.h green
2016-03-30 23:49 ` [PATCH v2 40/46] staging/lustre/llite: Remove unused vui_local_lock field green
2016-03-30 23:49 ` [PATCH v2 41/46] staging/lustre/ldlm: ELC picks locks in a safer policy green
2016-03-30 23:49 ` [PATCH v2 42/46] staging/lustre/ldlm: revert changes to ldlm_cancel_aged_policy() green
2016-03-30 23:49 ` [PATCH v2 43/46] staging/lustre/ldlm: restore the ELC for enqueue green
2016-03-30 23:49 ` [PATCH v2 44/46] staging/lustre: Fix spacing style before open parenthesis green
2016-03-30 23:49 ` [PATCH v2 45/46] staging/lustre/ldlm: Solve a race for LRU lock cancel green
2016-03-30 23:49 ` [PATCH v2 46/46] staging/lustre: lov_io_init() should return error code green

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=1459381747-2886687-39-git-send-email-green@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    /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