Paulo Alcantara
2c55d67184
smb: client: fix chmod(2) regression with ATTR_READONLY
...
[ Upstream commit 654292a0b264e9b8c51b98394146218a21612aa1 ]
When the user sets a file or directory as read-only (e.g. ~S_IWUGO),
the client will set the ATTR_READONLY attribute by sending an
SMB2_SET_INFO request to the server in cifs_setattr_{,nounix}(), but
cifsInodeInfo::cifsAttrs will be left unchanged as the client will
only update the new file attributes in the next call to
{smb311_posix,cifs}_get_inode_info() with the new metadata filled in
@data parameter.
Commit a18280e7fd ("smb: cilent: set reparse mount points as
automounts") mistakenly removed the @data NULL check when calling
is_inode_cache_good(), which broke the above case as the new
ATTR_READONLY attribute would end up not being updated on files with a
read lease.
Fix this by updating the inode whenever we have cached metadata in
@data parameter.
Reported-by: Horst Reiterer <horst.reiterer@fabasoft.com >
Closes: https://lore.kernel.org/r/85a16504e09147a195ac0aac1c801280@fabasoft.com
Fixes: a18280e7fd ("smb: cilent: set reparse mount points as automounts")
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com >
Signed-off-by: Steve French <stfrench@microsoft.com >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-03-13 12:58:20 +01:00
..
2024-11-22 15:38:37 +01:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2025-03-07 16:45:38 +01:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2025-02-21 13:57:19 +01:00
2025-02-17 09:40:42 +01:00
2025-01-09 13:31:54 +01:00
2023-08-28 09:31:32 -07:00
2023-07-13 10:28:05 +02:00
2024-08-19 06:04:25 +02:00
2024-10-04 16:29:48 +02:00
2024-01-20 11:51:37 +01:00
2023-08-28 10:17:14 -07:00
2025-02-08 09:51:41 +01:00
2024-10-04 16:29:48 +02:00
2024-12-27 13:58:50 +01:00
2023-08-29 20:21:42 -07:00
2025-01-17 13:36:11 +01:00
2025-01-17 13:36:10 +01:00
2023-08-29 17:45:22 -04:00
2024-08-03 08:54:15 +02:00
2025-02-01 18:37:55 +01:00
2025-02-08 09:52:35 +01:00
2024-10-22 15:46:20 +02:00
2023-08-29 20:21:42 -07:00
2024-12-09 10:31:45 +01:00
2024-09-12 11:11:26 +02:00
2025-02-01 18:37:52 +01:00
2025-01-23 17:21:13 +01:00
2024-12-09 10:31:45 +01:00
2025-02-11 09:37:33 +01:00
2023-08-29 20:21:42 -07:00
2024-02-23 09:25:16 +01:00
2025-01-23 17:21:14 +01:00
2024-04-13 13:07:34 +02:00
2025-01-17 13:36:09 +01:00
2024-12-14 20:00:21 +01:00
2024-12-14 20:00:07 +01:00
2024-08-29 17:33:33 +02:00
2024-08-19 06:04:23 +02:00
2023-08-29 20:21:42 -07:00
2023-09-18 12:03:46 -07:00
2025-02-21 13:57:11 +01:00
2023-04-13 13:13:52 -07:00
2025-02-21 13:57:06 +01:00
2025-02-27 04:10:54 -08:00
2023-08-31 12:07:34 -05:00
2025-01-23 17:21:19 +01:00
2023-08-29 20:21:42 -07:00
2025-01-09 13:31:46 +01:00
2025-02-17 09:40:42 +01:00
2023-08-29 20:21:42 -07:00
2024-06-12 11:11:30 +02:00
2025-02-21 13:57:12 +01:00
2025-03-07 16:45:36 +01:00
2025-02-17 09:40:15 +01:00
2025-02-08 09:51:42 +01:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-12-09 10:33:01 +01:00
2023-07-24 10:30:04 +02:00
2024-08-19 06:04:26 +02:00
2024-08-19 06:04:25 +02:00
2025-03-13 12:58:20 +01:00
2024-09-12 11:11:39 +02:00
2024-04-27 17:11:41 +02:00
2024-04-13 13:07:34 +02:00
2024-09-12 11:11:27 +02:00
2025-02-08 09:52:28 +01:00
2025-01-09 13:31:50 +01:00
2023-08-29 20:21:42 -07:00
2024-12-14 20:00:20 +01:00
2024-05-17 12:02:13 +02:00
2024-06-16 13:47:33 +02:00
2025-02-27 04:10:44 -08:00
2024-02-23 09:25:13 +01:00
2024-04-03 15:28:44 +02:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2024-08-29 17:33:33 +02:00
2024-09-12 11:11:29 +02:00
2025-02-17 09:40:16 +01:00
2024-08-29 17:33:27 +02:00
2025-02-08 09:52:26 +01:00
2023-05-15 09:42:01 +02:00
2023-06-26 09:50:21 -07:00
2023-05-17 09:16:59 +02:00
2024-11-08 16:28:19 +01:00
2024-07-25 09:50:54 +02:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2024-12-27 13:58:57 +01:00
2025-02-17 09:40:03 +01:00
2024-10-04 16:29:56 +02:00
2024-08-19 06:04:28 +02:00
2025-02-08 09:51:42 +01:00
2025-01-23 17:21:13 +01:00
2023-10-12 18:53:36 +03:00
2023-08-21 13:46:25 -07:00
2024-06-27 13:49:00 +02:00
2023-08-14 18:48:02 +02:00
2023-01-19 09:24:28 +01:00
2024-12-09 10:31:41 +01:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:18:54 -08:00
2025-01-17 13:36:26 +01:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2025-02-01 18:37:54 +01:00
2024-07-27 11:34:10 +02:00
2023-08-02 09:13:09 -06:00
2022-12-08 21:49:25 -05:00
2023-01-19 09:24:30 +01:00
2023-04-18 16:30:02 -07:00
2024-10-04 16:29:48 +02:00
2024-10-04 16:28:51 +02:00
2023-07-13 10:28:04 +02:00
2024-11-01 01:58:32 +01:00
2024-04-10 16:35:57 +02:00
2023-05-19 04:30:22 +02:00
2023-05-19 04:30:22 +02:00
2023-07-13 10:28:04 +02:00
2023-05-24 08:42:16 -06:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2023-05-24 11:03:59 +02:00
2025-02-08 09:51:43 +01:00
2023-08-29 14:25:26 -07:00
2023-07-13 10:28:04 +02:00
2023-12-03 07:33:03 +01:00
2023-05-17 15:20:17 +02:00
2024-08-19 06:04:25 +02:00
2023-05-23 21:43:26 -07:00
2024-07-18 13:21:22 +02:00
2023-02-20 11:53:11 -08:00
2024-09-12 11:11:38 +02:00