OSDN Git Service

fat: factor out reusable code in vfat_rename() as helper functions
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fri, 10 Jun 2022 07:57:19 +0000 (09:57 +0200)
committerakpm <akpm@linux-foundation.org>
Fri, 17 Jun 2022 02:58:22 +0000 (19:58 -0700)
commit204d03203a145b443cd8676dc12dbb47e1a3751f
tree7ea1da687e7636bdca0c7b6adcd8a0cd5bc5586a
parent019a0c9e377c9f7bd477a0742706d93cdddaee4d
fat: factor out reusable code in vfat_rename() as helper functions

The vfat_rename() function is quite big and there are code blocks that can
be moved into helper functions.  This not only simplify the implementation
of that function but also allows these helpers to be reused.

For example, the helpers can be used by the handler of the RENAME_EXCHANGE
flag once this is implemented in a subsequent patch.

Link: https://lkml.kernel.org/r/20220610075721.1182745-3-javierm@redhat.com
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Alexander Larsson <alexl@redhat.com>
Cc: Christian Kellner <ckellner@redhat.com>
Cc: Chung-Chiang Cheng <cccheng@synology.com>
Cc: Colin Walters <walters@verbum.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/namei_vfat.c