fs: Move mmap callback before truncate in [file|mountpt]_operations

since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-01-03 01:06:12 +08:00
committed by Petro Karashchenko
parent c623ee20f1
commit b0a0ba3ad7
103 changed files with 105 additions and 106 deletions
+1 -1
View File
@@ -47,8 +47,8 @@ static const struct file_operations g_fifo_fops =
pipecommon_write, /* write */
NULL, /* seek */
pipecommon_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
NULL, /* truncate */
pipecommon_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, pipecommon_unlink /* unlink */
+1 -1
View File
@@ -61,8 +61,8 @@ static const struct file_operations g_pipe_fops =
pipecommon_write, /* write */
NULL, /* seek */
pipecommon_ioctl, /* ioctl */
NULL, /* truncate */
NULL, /* mmap */
NULL, /* truncate */
pipecommon_poll /* poll */
};