From: Jimmy Zuber <jamz@amazon.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: <fuse-devel@lists.linux.dev>, <linux-kselftest@vger.kernel.org>,
"Shuah Khan" <shuah@kernel.org>,
Bernd Schubert <bernd@bsbernd.com>,
Jim Harris <jiharris@nvidia.com>,
Horst Birthelmer <horst@birthelmer.de>,
Luis Henriques <luis@igalia.com>, NeilBrown <neil@brown.name>,
Joanne Koong <joannelkoong@gmail.com>
Subject: [PATCH v9 1/3] fuse: move fuse_statx_to_attr() up
Date: Sat, 21 Nov 2026 00:16:06 +0000 [thread overview]
Message-ID: <20261121001608.996811-2-jamz@amazon.com> (raw)
In-Reply-To: <20261121001608.996811-1-jamz@amazon.com>
Move fuse_statx_to_attr() above fuse_atomic_open(), for use by
FUSE_OPEN_ATOMIC in the next patch.
Signed-off-by: Jimmy Zuber <jamz@amazon.com>
---
fs/fuse/dir.c | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index da23ccd8685cf..a719e3516e187 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -935,6 +935,26 @@ static int fuse_create_open(const struct mnt_idmap *idmap, struct inode *dir,
return err;
}
+static void fuse_statx_to_attr(struct fuse_statx *sx, struct fuse_attr *attr)
+{
+ memset(attr, 0, sizeof(*attr));
+ attr->ino = sx->ino;
+ attr->size = sx->size;
+ attr->blocks = sx->blocks;
+ attr->atime = sx->atime.tv_sec;
+ attr->mtime = sx->mtime.tv_sec;
+ attr->ctime = sx->ctime.tv_sec;
+ attr->atimensec = sx->atime.tv_nsec;
+ attr->mtimensec = sx->mtime.tv_nsec;
+ attr->ctimensec = sx->ctime.tv_nsec;
+ attr->mode = sx->mode;
+ attr->nlink = sx->nlink;
+ attr->uid = sx->uid;
+ attr->gid = sx->gid;
+ attr->rdev = new_encode_dev(MKDEV(sx->rdev_major, sx->rdev_minor));
+ attr->blksize = sx->blksize;
+}
+
static int fuse_mknod(const struct mnt_idmap *, struct inode *, struct dentry *,
umode_t, dev_t);
static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
@@ -1410,26 +1430,6 @@ static void fuse_fillattr(const struct mnt_idmap *idmap, struct inode *inode,
stat->blksize = 1 << blkbits;
}
-static void fuse_statx_to_attr(struct fuse_statx *sx, struct fuse_attr *attr)
-{
- memset(attr, 0, sizeof(*attr));
- attr->ino = sx->ino;
- attr->size = sx->size;
- attr->blocks = sx->blocks;
- attr->atime = sx->atime.tv_sec;
- attr->mtime = sx->mtime.tv_sec;
- attr->ctime = sx->ctime.tv_sec;
- attr->atimensec = sx->atime.tv_nsec;
- attr->mtimensec = sx->mtime.tv_nsec;
- attr->ctimensec = sx->ctime.tv_nsec;
- attr->mode = sx->mode;
- attr->nlink = sx->nlink;
- attr->uid = sx->uid;
- attr->gid = sx->gid;
- attr->rdev = new_encode_dev(MKDEV(sx->rdev_major, sx->rdev_minor));
- attr->blksize = sx->blksize;
-}
-
static int fuse_do_statx(const struct mnt_idmap *idmap, struct inode *inode,
struct file *file, struct kstat *stat)
{
--
2.50.1
next prev parent reply other threads:[~2026-11-21 0:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 0:16 [PATCH v9 0/3] fuse: atomic open Jimmy Zuber
2026-11-21 0:16 ` Jimmy Zuber [this message]
2026-11-21 0:16 ` [PATCH v9 2/3] fuse: add FUSE_OPEN_ATOMIC Jimmy Zuber
2026-11-21 0:16 ` [PATCH v9 3/3] selftests/fuse: add test for FUSE_OPEN_ATOMIC Jimmy Zuber
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=20261121001608.996811-2-jamz@amazon.com \
--to=jamz@amazon.com \
--cc=bernd@bsbernd.com \
--cc=fuse-devel@lists.linux.dev \
--cc=horst@birthelmer.de \
--cc=jiharris@nvidia.com \
--cc=joannelkoong@gmail.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=luis@igalia.com \
--cc=miklos@szeredi.hu \
--cc=neil@brown.name \
--cc=shuah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox