All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH 4/4] libfs: document simple_get_link()
Date: Thu, 11 Apr 2019 16:16:30 -0700	[thread overview]
Message-ID: <20190411231630.50177-5-ebiggers@kernel.org> (raw)
In-Reply-To: <20190411231630.50177-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/libfs.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/fs/libfs.c b/fs/libfs.c
index 0fb590d79f30e..5f74a98729742 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1167,6 +1167,20 @@ simple_nosetlease(struct file *filp, long arg, struct file_lock **flp,
 }
 EXPORT_SYMBOL(simple_nosetlease);
 
+/**
+ * simple_get_link - generic helper to get the target of "fast" symlinks
+ * @dentry: not used here
+ * @inode: the symlink inode
+ * @done: not used here
+ *
+ * Generic helper for filesystems to use for symlink inodes where a pointer to
+ * the symlink target is stored in ->i_link.  NOTE: this isn't normally called,
+ * since as an optimization the path lookup code uses any non-NULL ->i_link
+ * directly, without calling ->get_link().  But ->get_link() still must be set,
+ * to mark the inode_operations as being for a symlink.
+ *
+ * Return: the symlink target
+ */
 const char *simple_get_link(struct dentry *dentry, struct inode *inode,
 			    struct delayed_call *done)
 {
-- 
2.21.0.392.gf8f6787159e-goog


  parent reply	other threads:[~2019-04-11 23:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 23:16 [PATCH 0/4] vfs: update ->get_link() related documentation Eric Biggers
2019-04-11 23:16 ` [PATCH 1/4] Documentation/filesystems/vfs.txt: remove bogus "Last updated" date Eric Biggers
2019-04-11 23:16 ` [PATCH 2/4] Documentation/filesystems/vfs.txt: document how ->i_link works Eric Biggers
2019-04-11 23:16 ` [PATCH 3/4] Documentation/filesystems/Locking: fix ->get_link() prototype Eric Biggers
2019-04-11 23:16 ` Eric Biggers [this message]
2019-04-22 18:03 ` [PATCH 0/4] vfs: update ->get_link() related documentation Eric Biggers
2019-05-01  0:25   ` Eric Biggers
2019-05-01  1:36     ` Al Viro
2019-05-01  1:49       ` Jonathan Corbet
2019-05-01  2:14         ` Al Viro
2019-05-01  2:17           ` Jonathan Corbet
2019-05-01  4:00             ` Al Viro
2019-05-01  4:15           ` Tobin C. Harding
2019-05-03 12:16             ` Jonathan Corbet

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=20190411231630.50177-5-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.