Skip to content

Commit

Permalink
cifs: Fix zero_point init on inode initialisation
Browse files Browse the repository at this point in the history
Fix cifs_fattr_to_inode() such that the ->zero_point tracking variable
is initialised when the inode is initialised.

Fixes: 3ee1a1f ("cifs: Cut over to using netfslib")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
David Howells authored and Steve French committed Sep 3, 2024
1 parent f9c169b commit 517b58c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/smb/client/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr,
CIFS_I(inode)->time = 0; /* force reval */
return -ESTALE;
}
if (inode->i_state & I_NEW)
CIFS_I(inode)->netfs.zero_point = fattr->cf_eof;

cifs_revalidate_cache(inode, fattr);

Expand Down

0 comments on commit 517b58c

Please sign in to comment.