ubifs: Implement RENAME_EXCHANGE
authorRichard Weinberger <richard@nod.at>
Wed, 14 Sep 2016 20:28:51 +0000 (22:28 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 2 Oct 2016 20:55:02 +0000 (22:55 +0200)
commit9ec64962afb1702f75bdf046fffeecf9c8737518
tree91e5e08c8f887007ba410c75db536d407e41c49f
parent9e0a1fff8db56eaaebb74b4a3ef65f86811c4798
ubifs: Implement RENAME_EXCHANGE

Adds RENAME_EXCHANGE to UBIFS, the operation itself
is completely disjunct from a regular rename() that's
why we dispatch very early in ubifs_reaname().

RENAME_EXCHANGE used by the renameat2() system call
allows the caller to exchange two paths atomically.
Both paths have to exist and have to be on the same
filesystem.

Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/dir.c
fs/ubifs/journal.c
fs/ubifs/ubifs.h