mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
FROMGIT: binder: frozen notification binder_features flag
Add a flag to binder_features to indicate that the freeze notification feature is available. Signed-off-by: Yu-Ting Tseng <yutingtseng@google.com> Acked-by: Carlos Llamas <cmllamas@google.com> Link: https://lore.kernel.org/r/20240709070047.4055369-6-yutingtseng@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 363013421 (cherry picked from commit 30b968b002a92870325a5c9d1ce78eba0ce386e7 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next) Change-Id: Ic26c8ae42d27c6fd8f5daed5eecabd1652e29502 Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
eda0570485
commit
2f43c68d05
@@ -60,6 +60,7 @@ enum binderfs_stats_mode {
|
||||
struct binder_features {
|
||||
bool oneway_spam_detection;
|
||||
bool extended_error;
|
||||
bool freeze_notification;
|
||||
};
|
||||
|
||||
static const struct constant_table binderfs_param_stats[] = {
|
||||
@@ -76,6 +77,7 @@ static const struct fs_parameter_spec binderfs_fs_parameters[] = {
|
||||
static struct binder_features binder_features = {
|
||||
.oneway_spam_detection = true,
|
||||
.extended_error = true,
|
||||
.freeze_notification = true,
|
||||
};
|
||||
|
||||
static inline struct binderfs_info *BINDERFS_SB(const struct super_block *sb)
|
||||
@@ -610,6 +612,12 @@ static int init_binder_features(struct super_block *sb)
|
||||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
dentry = binderfs_create_file(dir, "freeze_notification",
|
||||
&binder_features_fops,
|
||||
&binder_features.freeze_notification);
|
||||
if (IS_ERR(dentry))
|
||||
return PTR_ERR(dentry);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
|
||||
static const char * const binder_features[] = {
|
||||
"oneway_spam_detection",
|
||||
"extended_error",
|
||||
"freeze_notification",
|
||||
};
|
||||
|
||||
change_mountns(_metadata);
|
||||
|
||||
Reference in New Issue
Block a user