Commit 3f92c7b
ceph: return the correct dentry on mkdir
ceph already splices the correct dentry (in splice_dentry()) from the
result of mkdir but does nothing more with it.
Now that ->mkdir can return a dentry, return the correct dentry.
Note that previously ceph_mkdir() could call
ceph_init_inode_acls()
on the inode from the wrong dentry, which would be NULL. This
is safe as ceph_init_inode_acls() checks for NULL, but is not
strictly correct. With this patch, the inode for the returned dentry
is passed to ceph_init_inode_acls().
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Link: https://lore.kernel.org/r/20250227013949.536172-4-neilb@suse.de
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent 3f90030 commit 3f92c7b
1 file changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| 1102 | + | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | 1105 | | |
| |||
1116 | 1117 | | |
1117 | 1118 | | |
1118 | 1119 | | |
1119 | | - | |
| 1120 | + | |
1120 | 1121 | | |
1121 | 1122 | | |
1122 | 1123 | | |
1123 | 1124 | | |
1124 | 1125 | | |
1125 | | - | |
| 1126 | + | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | 1129 | | |
1129 | 1130 | | |
1130 | | - | |
| 1131 | + | |
1131 | 1132 | | |
1132 | 1133 | | |
1133 | 1134 | | |
1134 | 1135 | | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | | - | |
| 1138 | + | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
1144 | | - | |
| 1145 | + | |
1145 | 1146 | | |
1146 | 1147 | | |
1147 | 1148 | | |
| |||
1165 | 1166 | | |
1166 | 1167 | | |
1167 | 1168 | | |
| 1169 | + | |
1168 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1169 | 1174 | | |
1170 | 1175 | | |
1171 | | - | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1172 | 1179 | | |
1173 | | - | |
| 1180 | + | |
1174 | 1181 | | |
| 1182 | + | |
1175 | 1183 | | |
1176 | | - | |
| 1184 | + | |
1177 | 1185 | | |
1178 | 1186 | | |
1179 | 1187 | | |
| |||
0 commit comments