From 50f0dd432bf59a71ac8c246b14de2e17701b3ab9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Tue, 30 Jan 2018 14:24:02 -0800 Subject: [PATCH] ANDROID: sdcardfs: Enable modular sdcardfs Export the following symbols: - copy_fs_struct - free_fs_struct - security_path_chown - set_fs_pwd - vfs_read - vfs_write These are needed to build sdcardfs as a module. Bug: 35142419 Bug: 120446149 Change-Id: If6e14f0b3bdc858a9f684e6c209927a9232091f0 Signed-off-by: Daniel Rosenberg Signed-off-by: Guenter Roeck [astrachan: Folded the following changes into this patch: e19f69662df5 ("ANDROID: Revert "fs: unexport vfs_read and vfs_write"") 17071a8e1e7d ("ANDROID: fs: Export free_fs_struct and set_fs_pwd") 2e9a639597cd ("ANDROID: export security_path_chown")] Signed-off-by: Alistair Strachan --- fs/fs_struct.c | 3 +++ fs/read_write.c | 4 ++++ security/security.c | 1 + 3 files changed, 8 insertions(+) diff --git a/fs/fs_struct.c b/fs/fs_struct.c index be0250788b73..987c95b950f6 100644 --- a/fs/fs_struct.c +++ b/fs/fs_struct.c @@ -45,6 +45,7 @@ void set_fs_pwd(struct fs_struct *fs, const struct path *path) if (old_pwd.dentry) path_put(&old_pwd); } +EXPORT_SYMBOL(set_fs_pwd); static inline int replace_path(struct path *p, const struct path *old, const struct path *new) { @@ -90,6 +91,7 @@ void free_fs_struct(struct fs_struct *fs) path_put(&fs->pwd); kmem_cache_free(fs_cachep, fs); } +EXPORT_SYMBOL(free_fs_struct); void exit_fs(struct task_struct *tsk) { @@ -128,6 +130,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old) } return fs; } +EXPORT_SYMBOL_GPL(copy_fs_struct); int unshare_fs_struct(void) { diff --git a/fs/read_write.c b/fs/read_write.c index 8a2737f0d61d..26f71acb0c48 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -460,6 +460,8 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) return ret; } +EXPORT_SYMBOL(vfs_read); + static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; @@ -558,6 +560,8 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ return ret; } +EXPORT_SYMBOL(vfs_write); + static inline loff_t file_pos_read(struct file *file) { return file->f_pos; diff --git a/security/security.c b/security/security.c index 736e78da1ab9..957be344cd25 100644 --- a/security/security.c +++ b/security/security.c @@ -607,6 +607,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) return 0; return call_int_hook(path_chown, 0, path, uid, gid); } +EXPORT_SYMBOL(security_path_chown); int security_path_chroot(const struct path *path) {