[Devel] [PATCH RH9 11/28] fs: Export symbols replace_fd() and create_pipe_files()

Andrey Zhadchenko andrey.zhadchenko at virtuozzo.com
Thu Oct 14 13:33:19 MSK 2021


From: Sergey Lysanov <slysanov at virtuozzo.com>

Need to create a pipe for usermodehelper from SCST.
User helper will read SCSI persistent reservations
from pipe and sync it with other nodes in cluster.
Kernel also will read new persistent reservations
from userspace by invoking helper with pipe.

Required for https://pmc.acronis.com/browse/VSTOR-10187

Signed-off-by: Sergey Lysanov <slysanov at virtuozzo.com>

(cherry-picked from vz7 commit a65a2e655b78 ("fs: Export symbols replace_fd()
and create_pipe_files()"))

Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>

(cherry picked from vz8 commit 63148b36d11de4e546b163948cb32279516b789a)
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 fs/file.c | 1 +
 fs/pipe.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/fs/file.c b/fs/file.c
index fabb57d..49c233d 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1116,6 +1116,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
 	spin_unlock(&files->file_lock);
 	return err;
 }
+EXPORT_SYMBOL(replace_fd);
 
 /**
  * __receive_fd() - Install received file into file descriptor table
diff --git a/fs/pipe.c b/fs/pipe.c
index 7f07ce7..19e0a89 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -946,6 +946,7 @@ int create_pipe_files(struct file **res, int flags)
 	stream_open(inode, res[1]);
 	return 0;
 }
+EXPORT_SYMBOL(create_pipe_files);
 
 static int __do_pipe_flags(int *fd, struct file **files, int flags)
 {
-- 
1.8.3.1



More information about the Devel mailing list