aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:45 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-05-26 17:12:23 -0400
commit561d64d1856868e056b7530cb08fd12a4043190a (patch)
treefd184bc267b32ae4600eee5e70e06455e1f83d8f
parent8dbebee16f9e8f35ff0396516426318636997b96 (diff)
Add object list to inodes
This patch adds a list of arbitrary objects to inodes. This is used by LITMUS^RT's locking API to attach lock objects to inodes (which represent namespaces in Linux's locking API).
-rw-r--r--fs/inode.c2
-rw-r--r--include/linux/fs.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 88110fd0b282..d063db37db34 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -374,6 +374,8 @@ void inode_init_once(struct inode *inode)
374#ifdef CONFIG_FSNOTIFY 374#ifdef CONFIG_FSNOTIFY
375 INIT_HLIST_HEAD(&inode->i_fsnotify_marks); 375 INIT_HLIST_HEAD(&inode->i_fsnotify_marks);
376#endif 376#endif
377 INIT_LIST_HEAD(&inode->i_obj_list);
378 mutex_init(&inode->i_obj_mutex);
377} 379}
378EXPORT_SYMBOL(inode_init_once); 380EXPORT_SYMBOL(inode_init_once);
379 381
diff --git a/include/linux/fs.h b/include/linux/fs.h
index dc0478c07b2a..ea7b14901884 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -591,6 +591,8 @@ is_uncached_acl(struct posix_acl *acl)
591 return (long)acl & 1; 591 return (long)acl & 1;
592} 592}
593 593
594struct inode_obj_id_table;
595
594#define IOP_FASTPERM 0x0001 596#define IOP_FASTPERM 0x0001
595#define IOP_LOOKUP 0x0002 597#define IOP_LOOKUP 0x0002
596#define IOP_NOFOLLOW 0x0004 598#define IOP_NOFOLLOW 0x0004
@@ -702,6 +704,9 @@ struct inode {
702 struct fscrypt_info *i_crypt_info; 704 struct fscrypt_info *i_crypt_info;
703#endif 705#endif
704 706
707 struct list_head i_obj_list;
708 struct mutex i_obj_mutex;
709
705 void *i_private; /* fs or device private pointer */ 710 void *i_private; /* fs or device private pointer */
706}; 711};
707 712