Commit b9a9be4
smb/client: properly disallow delegations on directories
The check for S_ISREG() in cifs_setlease() is incorrect since that
operation doesn't get called for directories. The correct way to prevent
delegations on directories is to set the ->setlease() method in directory
file_operations to simple_nosetlease().
Fixes: e6d28eb ("filelock: push the S_ISREG check down to ->setlease handlers")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260107-setlease-6-19-v1-2-85f034abcc57@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent 10dcd51 commit b9a9be4
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
1155 | 1152 | | |
1156 | 1153 | | |
1157 | 1154 | | |
| |||
1712 | 1709 | | |
1713 | 1710 | | |
1714 | 1711 | | |
| 1712 | + | |
1715 | 1713 | | |
1716 | 1714 | | |
1717 | 1715 | | |
| |||
0 commit comments