From: Christoph Hellwig <hch@infradead.org>
To: Marios Makassikis <mmakassikis@freebox.fr>
Cc: linux-cifs@vger.kernel.org
Subject: Re: [PATCH 1/2] ksmbd: replace generic_fillattr with vfs_getattr
Date: Tue, 20 Feb 2024 22:44:30 -0800 [thread overview]
Message-ID: <ZdWbzllIWD0zmzB5@infradead.org> (raw)
In-Reply-To: <20240220142601.3624584-1-mmakassikis@freebox.fr>
On Tue, Feb 20, 2024 at 03:26:00PM +0100, Marios Makassikis wrote:
> Use vfs_getattr instead of generic_fillattr in order to call the
> fs-specific ->getattr if it exists.
> vfs_getattr can return an error, so adapt functions to return the
> error to the caller.
>
> This fixes incorrectly filled AllocationSize field in SMB responses
> for files on XFS-backed shares.
Nothing XFS-specific here. Using generic_fillattr outside of a
->getattr implementation is simply wrong and code must use
->getattr to retrieve stat information from outside the file system.
The code changes looks good to me.
next prev parent reply other threads:[~2024-02-21 6:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 14:26 [PATCH 1/2] ksmbd: replace generic_fillattr with vfs_getattr Marios Makassikis
2024-02-20 14:26 ` [PATCH 2/2] ksmbd: retrieve number of blocks using vfs_getattr in set_file_allocation_info Marios Makassikis
2024-02-21 6:44 ` Christoph Hellwig
2024-02-21 16:34 ` Namjae Jeon
2024-02-21 6:44 ` Christoph Hellwig [this message]
2024-02-21 16:33 ` [PATCH 1/2] ksmbd: replace generic_fillattr with vfs_getattr Namjae Jeon
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=ZdWbzllIWD0zmzB5@infradead.org \
--to=hch@infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=mmakassikis@freebox.fr \
/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.