Skip to content

Commit 517b58c

Browse files
dhowellssmfrench
authored andcommitted
cifs: Fix zero_point init on inode initialisation
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 <[email protected]> Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> cc: Jeff Layton <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent f9c169b commit 517b58c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/smb/client/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr,
172172
CIFS_I(inode)->time = 0; /* force reval */
173173
return -ESTALE;
174174
}
175+
if (inode->i_state & I_NEW)
176+
CIFS_I(inode)->netfs.zero_point = fattr->cf_eof;
175177

176178
cifs_revalidate_cache(inode, fattr);
177179

0 commit comments

Comments
 (0)