Commit 193feb6
committed
Merge patch series 'Fix shmem_rename2 directory offset calculation' of https://lore.kernel.org/r/[email protected]
Pull shmem_rename2() offset fixes from Chuck Lever:
The existing code in shmem_rename2() allocates a fresh directory
offset value when renaming over an existing destination entry. User
space does not expect this behavior. In particular, applications
that rename while walking a directory can loop indefinitely because
they never reach the end of the directory.
* 'Fix shmem_rename2 directory offset calculation' of https://lore.kernel.org/r/[email protected]: (3 commits)
shmem: Fix shmem_rename2()
libfs: Add simple_offset_rename() API
libfs: Fix simple_offset_rename_exchange()
fs/libfs.c | 55 +++++++++++++++++++++++++++++++++++++++++-----
include/linux/fs.h | 2 ++
mm/shmem.c | 3 +--
3 files changed, 52 insertions(+), 8 deletions(-)
Signed-off-by: Christian Brauner <[email protected]>3 files changed
+52
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
| |||
345 | 357 | | |
346 | 358 | | |
347 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
348 | 390 | | |
349 | 391 | | |
350 | 392 | | |
351 | 393 | | |
352 | 394 | | |
353 | 395 | | |
354 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
355 | 400 | | |
356 | 401 | | |
357 | 402 | | |
| |||
369 | 414 | | |
370 | 415 | | |
371 | 416 | | |
372 | | - | |
| 417 | + | |
373 | 418 | | |
374 | 419 | | |
375 | 420 | | |
376 | | - | |
| 421 | + | |
377 | 422 | | |
378 | 423 | | |
379 | 424 | | |
| |||
388 | 433 | | |
389 | 434 | | |
390 | 435 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
| 436 | + | |
| 437 | + | |
395 | 438 | | |
396 | 439 | | |
397 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3353 | 3353 | | |
3354 | 3354 | | |
3355 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
3356 | 3358 | | |
3357 | 3359 | | |
3358 | 3360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3473 | 3473 | | |
3474 | 3474 | | |
3475 | 3475 | | |
3476 | | - | |
3477 | | - | |
| 3476 | + | |
3478 | 3477 | | |
3479 | 3478 | | |
3480 | 3479 | | |
| |||
0 commit comments