summaryrefslogtreecommitdiff
path: root/rust/kernel/irq/request.rs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.org>2025-10-07 16:23:24 -0300
committerSteve French <stfrench@microsoft.com>2025-10-09 10:42:14 -0500
commitb95cd1bdf5aa9221c98fc9259014b8bb8d1829d7 (patch)
treeebf3cfafdb233a2759eda56427b2bd30d01690b1 /rust/kernel/irq/request.rs
parent57ce9f7793b714fb14a97d502ce926162c3b96b1 (diff)
smb: client: fix missing timestamp updates after utime(2)
Don't reuse open handle when changing timestamps to prevent the server from disabling automatic timestamp updates as per MS-FSA 2.1.4.17. ---8<--- import os import time filename = '/mnt/foo' def print_stat(prefix): st = os.stat(filename) print(prefix, ': ', time.ctime(st.st_atime), time.ctime(st.st_ctime)) fd = os.open(filename, os.O_CREAT|os.O_TRUNC|os.O_WRONLY, 0o644) print_stat('old') os.utime(fd, None) time.sleep(2) os.write(fd, b'foo') os.close(fd) time.sleep(2) print_stat('new') ---8<--- Before patch: $ mount.cifs //srv/share /mnt -o ... $ python3 run.py old : Fri Oct 3 14:01:21 2025 Fri Oct 3 14:01:21 2025 new : Fri Oct 3 14:01:21 2025 Fri Oct 3 14:01:21 2025 After patch: $ mount.cifs //srv/share /mnt -o ... $ python3 run.py old : Fri Oct 3 17:03:34 2025 Fri Oct 3 17:03:34 2025 new : Fri Oct 3 17:03:36 2025 Fri Oct 3 17:03:36 2025 Fixes: b6f2a0f89d7e ("cifs: for compound requests, use open handle if possible") Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org> Cc: Frank Sorenson <sorenson@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> Cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'rust/kernel/irq/request.rs')
0 files changed, 0 insertions, 0 deletions