Skip to content

Commit

Permalink
smb3: fix caching of ctime on setxattr
Browse files Browse the repository at this point in the history
commit 5923d66 upstream.

Fixes xfstest generic/728 which had been failing due to incorrect
ctime after setxattr and removexattr

Update ctime on successful set of xattr

Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Steve French authored and gregkh committed Nov 28, 2023
1 parent 2d29a93 commit ef97cb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/smb/client/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
goto out;

if (pTcon->ses->server->ops->set_EA)
if (pTcon->ses->server->ops->set_EA) {
rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
full_path, name, value, (__u16)size,
cifs_sb->local_nls, cifs_sb);
if (rc == 0)
inode_set_ctime_current(inode);
}
break;

case XATTR_CIFS_ACL:
Expand Down

0 comments on commit ef97cb5

Please sign in to comment.