]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix to detect temporary name of multimedia file
authorChao Yu <yuchao0@huawei.com>
Mon, 5 Sep 2016 04:28:27 +0000 (12:28 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 8 Sep 2016 01:53:49 +0000 (18:53 -0700)
commit97b74cd446889a13ce1658bbe2625ace49f73f94
tree870a15762ccc2d3169439ff80984891b32bac37d
parentb446735d770cda3ffe095140030329e6dda95905
f2fs: fix to detect temporary name of multimedia file

Some applications may create multimeida file with temporary name like
'*.jpg.tmp' or '*.mp4.tmp', then rename to '*.jpg' or '*.mp4'.

Now, f2fs can only detect multimedia filename with specified format:
"filename + '.' + extension", so it will make f2fs missing to detect
multimedia file with special temporary name, result in failing to set
cold flag on file.

This patch enhances detection flow for enabling lookup extension in the
middle of temporary filename.

Reported-by: Xue Liu <liuxueliu.liu@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/namei.c