From: Vyacheslav Cherkashin Date: Mon, 16 Oct 2017 18:00:05 +0000 (+0300) Subject: KI: add kernel patch for CONFIG_SWAP_HOOK_FILE_OPS support X-Git-Tag: submit/tizen_4.0/20180109.094119~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=729404e6ec09ceba0996ae253734ee99c523f04c;p=platform%2Fkernel%2Fswap-modules.git KI: add kernel patch for CONFIG_SWAP_HOOK_FILE_OPS support Change-Id: I02be4335154ac888efb718fc21d83067f89da935 Signed-off-by: Vyacheslav Cherkashin --- diff --git a/kernel_integration/patches/0008-SWAP-DA-add-CONFIG_SWAP_HOOK_FILE_OPS.patch b/kernel_integration/patches/0008-SWAP-DA-add-CONFIG_SWAP_HOOK_FILE_OPS.patch new file mode 100644 index 00000000..903704d2 --- /dev/null +++ b/kernel_integration/patches/0008-SWAP-DA-add-CONFIG_SWAP_HOOK_FILE_OPS.patch @@ -0,0 +1,51 @@ +From 900256ccf3b36e505db99efd399ea0aa09cdda22 Mon Sep 17 00:00:00 2001 +From: Your Name +Date: Thu, 5 Oct 2017 12:35:59 +0300 +Subject: [PATCH 8/9] SWAP-DA: add CONFIG_SWAP_HOOK_FILE_OPS + +--- + fs/open.c | 3 +++ + include/swap/hook_file_ops.h | 10 ++++++++++ + 2 files changed, 13 insertions(+) + create mode 100644 include/swap/hook_file_ops.h + +diff --git a/fs/open.c b/fs/open.c +index 4a8a355..f58a7a6 100644 +--- a/fs/open.c ++++ b/fs/open.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1051,6 +1052,8 @@ int filp_close(struct file *filp, fl_owner_t id) + return 0; + } + ++ swap_fops_filp_close(filp); ++ + if (filp->f_op->flush) + retval = filp->f_op->flush(filp, id); + +diff --git a/include/swap/hook_file_ops.h b/include/swap/hook_file_ops.h +new file mode 100644 +index 0000000..95adcb1 +--- /dev/null ++++ b/include/swap/hook_file_ops.h +@@ -0,0 +1,10 @@ ++#ifndef _LINUX_SWAP_FILE_OPS_H ++#define _LINUX_SWAP_FILE_OPS_H ++ ++ ++static inline void swap_fops_filp_close(struct file *filp) ++{ ++} ++ ++ ++#endif /* _LINUX_SWAP_FILE_OPS_H */ +-- +2.1.4 +