From: Eric Biggers <ebiggers@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: introduce data read/write showing path info
Date: Mon, 21 Mar 2022 22:41:51 +0000 [thread overview]
Message-ID: <Yjj/L5/kwc5Oo74E@gmail.com> (raw)
In-Reply-To: <20220321223315.3228326-1-jaegeuk@kernel.org>
On Mon, Mar 21, 2022 at 03:33:15PM -0700, Jaegeuk Kim wrote:
> This was used in Android for a long time. Let's upstream it.
>
You still need to explain why this is useful.
> +static inline char *f2fs_get_pathname(char *buf, int len, struct inode *inode)
> +{
> + char *path;
> + struct dentry *d;
> +
> + /*
> + * d_obtain_alias() will either iput() if it locates an existing
> + * dentry or transfer the reference to the new dentry created.
> + * So get an extra reference here.
> + */
> + ihold(inode);
> + d = d_obtain_alias(inode);
Why does this use d_obtain_alias() to get a dentry instead of just using the
dentry of the open file?
- Eric
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: introduce data read/write showing path info
Date: Mon, 21 Mar 2022 22:41:51 +0000 [thread overview]
Message-ID: <Yjj/L5/kwc5Oo74E@gmail.com> (raw)
In-Reply-To: <20220321223315.3228326-1-jaegeuk@kernel.org>
On Mon, Mar 21, 2022 at 03:33:15PM -0700, Jaegeuk Kim wrote:
> This was used in Android for a long time. Let's upstream it.
>
You still need to explain why this is useful.
> +static inline char *f2fs_get_pathname(char *buf, int len, struct inode *inode)
> +{
> + char *path;
> + struct dentry *d;
> +
> + /*
> + * d_obtain_alias() will either iput() if it locates an existing
> + * dentry or transfer the reference to the new dentry created.
> + * So get an extra reference here.
> + */
> + ihold(inode);
> + d = d_obtain_alias(inode);
Why does this use d_obtain_alias() to get a dentry instead of just using the
dentry of the open file?
- Eric
next prev parent reply other threads:[~2022-03-21 22:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 22:33 [f2fs-dev] [PATCH] f2fs: introduce data read/write showing path info Jaegeuk Kim
2022-03-21 22:33 ` Jaegeuk Kim
2022-03-21 22:41 ` Eric Biggers [this message]
2022-03-21 22:41 ` [f2fs-dev] " Eric Biggers
2022-03-22 0:14 ` Jaegeuk Kim
2022-03-22 0:14 ` Jaegeuk Kim
2022-03-22 0:13 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2022-03-22 0:13 ` Jaegeuk Kim
2022-03-29 3:04 ` [f2fs-dev] " Chao Yu
2022-03-29 3:04 ` Chao Yu
2022-03-29 3:13 ` [f2fs-dev] [PATCH v3] " Jaegeuk Kim
2022-03-29 3:13 ` Jaegeuk Kim
2022-03-29 14:23 ` Chao Yu
2022-03-29 14:23 ` Chao Yu
2022-03-29 18:09 ` Jaegeuk Kim
2022-03-29 18:09 ` Jaegeuk Kim
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=Yjj/L5/kwc5Oo74E@gmail.com \
--to=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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 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.