From 6d339bd52ace92cc152981402d03192e0928206e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B6=A6?= Date: Mon, 29 Apr 2024 02:42:48 +0000 Subject: [PATCH 1/5] update fs/sharefs/authentication.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈润 --- fs/sharefs/authentication.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/sharefs/authentication.h b/fs/sharefs/authentication.h index 165b66fc9c4f..94ec6b9ca0b1 100644 --- a/fs/sharefs/authentication.h +++ b/fs/sharefs/authentication.h @@ -5,6 +5,9 @@ * Copyright (c) 2023 Huawei Device Co., Ltd. */ +#ifndef AUTHENTICATION_H +#define AUTHENTICATION_H + #include "sharefs.h" #define OID_ROOT 0 @@ -73,3 +76,5 @@ static inline int get_bundle_uid(struct sharefs_sb_info *sbi, const char *bname) { return sbi->user_id * BASE_USER_RANGE + get_bid_config(bname); } + +#endif //__AUTHENTICATION_H \ No newline at end of file -- Gitee From 1e6222c22fb71e7936337243b5eb69f9bc2301c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B6=A6?= Date: Mon, 29 Apr 2024 02:44:00 +0000 Subject: [PATCH 2/5] update fs/sharefs/file.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈润 --- fs/sharefs/file.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/sharefs/file.c b/fs/sharefs/file.c index 238cc2f7484d..f04963d57a4a 100644 --- a/fs/sharefs/file.c +++ b/fs/sharefs/file.c @@ -157,8 +157,7 @@ static loff_t sharefs_file_llseek(struct file *file, loff_t offset, int whence) /* * Sharefs read_iter, redirect modified iocb to lower read_iter */ -ssize_t -sharefs_read_iter(struct kiocb *iocb, struct iov_iter *iter) +ssize_t sharefs_read_iter(struct kiocb *iocb, struct iov_iter *iter) { int err; struct file *file = iocb->ki_filp; @@ -188,8 +187,7 @@ sharefs_read_iter(struct kiocb *iocb, struct iov_iter *iter) /* * Sharefs write_iter, redirect modified iocb to lower write_iter */ -ssize_t -sharefs_write_iter(struct kiocb *iocb, struct iov_iter *iter) +ssize_t sharefs_write_iter(struct kiocb *iocb, struct iov_iter *iter) { int err; struct file *file = iocb->ki_filp; -- Gitee From 1c669fc639f7e00289c42520477a5dc8999eaa7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B6=A6?= Date: Mon, 29 Apr 2024 02:46:33 +0000 Subject: [PATCH 3/5] update fs/sharefs/inode.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈润 --- fs/sharefs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/sharefs/inode.c b/fs/sharefs/inode.c index 23d8530e8595..d0964f744338 100644 --- a/fs/sharefs/inode.c +++ b/fs/sharefs/inode.c @@ -77,8 +77,7 @@ static int sharefs_getattr(const struct path *path, struct kstat *stat, return ret; } -static ssize_t -sharefs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) +static ssize_t sharefs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) { int err; struct dentry *lower_dentry; -- Gitee From 48be4e863d80318de8c9588417d3bb0263b7710b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B6=A6?= Date: Mon, 29 Apr 2024 02:49:55 +0000 Subject: [PATCH 4/5] update fs/sharefs/main.c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈润 --- fs/sharefs/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/sharefs/main.c b/fs/sharefs/main.c index 6a858b49f73b..2ce5bb71bcac 100644 --- a/fs/sharefs/main.c +++ b/fs/sharefs/main.c @@ -145,7 +145,6 @@ static struct file_system_type sharefs_fs_type = { .kill_sb = generic_shutdown_super, .fs_flags = 0, }; -MODULE_ALIAS_FS(SHAREFS_NAME); static int __init init_sharefs_fs(void) { @@ -185,9 +184,10 @@ static void __exit exit_sharefs_fs(void) pr_info("Completed sharefs module unload\n"); } -MODULE_AUTHOR("Jingjing Mao"); -MODULE_DESCRIPTION("Sharefs"); -MODULE_LICENSE("GPL"); - module_init(init_sharefs_fs); module_exit(exit_sharefs_fs); + +MODULE_LICENSE("GPL V2"); +MODULE_AUTHOR("Jingjing Mao"); +MODULE_DESCRIPTION("Share File System"); +MODULE_ALIAS_FS("sharefs"); -- Gitee From 3db9a2df54804fc1e2192194ef89588dd4bf72cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B6=A6?= Date: Thu, 2 May 2024 06:38:16 +0000 Subject: [PATCH 5/5] update fs/sharefs/authentication.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈润 --- fs/sharefs/authentication.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/sharefs/authentication.h b/fs/sharefs/authentication.h index 94ec6b9ca0b1..541acafc9506 100644 --- a/fs/sharefs/authentication.h +++ b/fs/sharefs/authentication.h @@ -77,4 +77,4 @@ static inline int get_bundle_uid(struct sharefs_sb_info *sbi, const char *bname) return sbi->user_id * BASE_USER_RANGE + get_bid_config(bname); } -#endif //__AUTHENTICATION_H \ No newline at end of file +#endif //__AUTHENTICATION_H__ \ No newline at end of file -- Gitee