ANDROID: mm: shmem: add vendor data in 'shmem_inode_info'
Add vendor specific data in the 'struct shmem_inode_info'. Also properly initialize the vendor data by adding this fixup: https://android-review.googlesource.com/c/kernel/common/+/2969472 Bug: 273448633 Change-Id: I83a3ac822275d2464af7eb25b869b816fdb7276e Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com> (cherry picked from commit f1d69f5a1119f3519dca0370f46b93bb5dfb7083) Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
This commit is contained in:
committed by
Georgi Djakov
parent
1429c3c9ab
commit
059a229c3e
@@ -10,6 +10,7 @@
|
||||
#include <linux/xattr.h>
|
||||
#include <linux/fs_parser.h>
|
||||
#include <linux/userfaultfd_k.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
/* inode in-kernel data */
|
||||
|
||||
@@ -40,6 +41,8 @@ struct shmem_inode_info {
|
||||
struct dquot __rcu *i_dquot[MAXQUOTAS];
|
||||
#endif
|
||||
struct inode vfs_inode;
|
||||
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
};
|
||||
|
||||
#define SHMEM_FL_USER_VISIBLE FS_FL_USER_VISIBLE
|
||||
|
||||
@@ -84,6 +84,7 @@ static struct vfsmount *shm_mnt __ro_after_init;
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/quotaops.h>
|
||||
#include <linux/rcupdate_wait.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
@@ -2816,6 +2817,7 @@ static struct inode *__shmem_get_inode(struct mnt_idmap *idmap,
|
||||
inode->i_generation = get_random_u32();
|
||||
info = SHMEM_I(inode);
|
||||
memset(info, 0, (char *)inode - (char *)info);
|
||||
android_init_vendor_data(info, 1);
|
||||
spin_lock_init(&info->lock);
|
||||
atomic_set(&info->stop_eviction, 0);
|
||||
info->seals = F_SEAL_SEAL;
|
||||
|
||||
Reference in New Issue
Block a user