All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: ceph-devel@vger.kernel.org
Cc: idridryomov@gmail.com, sage@redhat.com, zyan@redhat.com
Subject: [RFC PATCH v3 03/10] ceph: make dentry_lease_is_valid non-static
Date: Tue, 21 Jan 2020 14:29:21 -0500	[thread overview]
Message-ID: <20200121192928.469316-4-jlayton@kernel.org> (raw)
In-Reply-To: <20200121192928.469316-1-jlayton@kernel.org>

...and move a comment over the proper function.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/dir.c   | 10 +++++-----
 fs/ceph/super.h |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 10294f07f5f0..9d2eca67985a 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -1477,10 +1477,6 @@ void ceph_invalidate_dentry_lease(struct dentry *dentry)
 	spin_unlock(&dentry->d_lock);
 }
 
-/*
- * Check if dentry lease is valid.  If not, delete the lease.  Try to
- * renew if the least is more than half up.
- */
 static bool __dentry_lease_is_valid(struct ceph_dentry_info *di)
 {
 	struct ceph_mds_session *session;
@@ -1507,7 +1503,11 @@ static bool __dentry_lease_is_valid(struct ceph_dentry_info *di)
 	return false;
 }
 
-static int dentry_lease_is_valid(struct dentry *dentry, unsigned int flags)
+/*
+ * Check if dentry lease is valid.  If not, delete the lease.  Try to
+ * renew if the least is more than half up.
+ */
+int dentry_lease_is_valid(struct dentry *dentry, unsigned int flags)
 {
 	struct ceph_dentry_info *di;
 	struct ceph_mds_session *session = NULL;
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index ec4d66d7c261..f27b2bf9a3f5 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -1121,6 +1121,7 @@ extern int ceph_handle_snapdir(struct ceph_mds_request *req,
 extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
 					 struct dentry *dentry, int err);
 
+extern int dentry_lease_is_valid(struct dentry *dentry, unsigned int flags);
 extern void __ceph_dentry_lease_touch(struct ceph_dentry_info *di);
 extern void __ceph_dentry_dir_lease_touch(struct ceph_dentry_info *di);
 extern void ceph_invalidate_dentry_lease(struct dentry *dentry);
-- 
2.24.1

  parent reply	other threads:[~2020-01-21 19:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 19:29 [RFC PATCH v3 00/10] ceph: asynchronous file create support Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 01/10] ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c Jeff Layton
2020-01-24 19:04   ` Jeff Layton
2020-01-25  8:08     ` Ilya Dryomov
2020-01-21 19:29 ` [RFC PATCH v3 02/10] ceph: make ceph_fill_inode non-static Jeff Layton
2020-01-21 19:29 ` Jeff Layton [this message]
2020-01-22  7:20   ` [RFC PATCH v3 03/10] ceph: make dentry_lease_is_valid non-static Yan, Zheng
2020-01-22 11:26     ` Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 04/10] ceph: make __take_cap_refs non-static Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 05/10] ceph: decode interval_sets for delegated inos Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 06/10] ceph: add flag to designate that a request is asynchronous Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 07/10] ceph: add infrastructure for waiting for async create to complete Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 08/10] ceph: add new MDS req field to hold delegated inode number Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 09/10] ceph: cache layout in parent dir on first sync create Jeff Layton
2020-01-21 19:29 ` [RFC PATCH v3 10/10] ceph: attempt to do async create when possible Jeff Layton
2020-01-22  7:29 ` [RFC PATCH v3 00/10] ceph: asynchronous file create support Yan, Zheng
2020-01-22 17:04 ` Yan, Zheng
2020-01-24 17:19   ` Jeff Layton
2020-01-25  1:58     ` Yan, Zheng
2020-01-25  1:58     ` Yan, Zheng

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=20200121192928.469316-4-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idridryomov@gmail.com \
    --cc=sage@redhat.com \
    --cc=zyan@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.