Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace generic_fillattr with vfs_getattr in SMB1 specific code #475

Conversation

mmakassikis
Copy link

No description provided.

Marios Makassikis added 5 commits February 22, 2024 01:02
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.

Signed-off-by: Marios Makassikis <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
…tion_info

Use vfs_getattr() as inode->i_blocks may be 0 on some filesystems (XFS
for example).

Signed-off-by: Marios Makassikis <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
path_put() is called twice on the same path in smb_setattr

Fixes: d60c3c8 ("ksmbd: smb1: convert ksmbd_vfs_kern_path to
ksmbd_vfs_kern_path_locked")

Signed-off-by: Marios Makassikis <[email protected]>
generic_fillattr should only be used by filesystems in their
->getattr implementation.

Signed-off-by: Marios Makassikis <[email protected]>
@mmakassikis
Copy link
Author

As discussed in #474

@namjaejeon
Copy link
Owner

Applied. Thanks for your work!

@mmakassikis mmakassikis deleted the private/marios/smb1_vfs_getattr branch March 18, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants