summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/llist.h19
-rw-r--r--include/linux/sunrpc/rpc_pipe_fs.h4
-rw-r--r--include/uapi/asm-generic/fcntl.h8
4 files changed, 14 insertions, 19 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a35b10e9a6807..981874773e85a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -10,6 +10,7 @@
#include <linux/stat.h>
#include <linux/cache.h>
#include <linux/list.h>
+#include <linux/llist.h>
#include <linux/radix-tree.h>
#include <linux/rbtree.h>
#include <linux/init.h>
@@ -768,6 +769,7 @@ struct file {
*/
union {
struct list_head fu_list;
+ struct llist_node fu_llist;
struct rcu_head fu_rcuhead;
} f_u;
struct path f_path;
diff --git a/include/linux/llist.h b/include/linux/llist.h
index a5199f6d0e825..cdaa7f0238993 100644
--- a/include/linux/llist.h
+++ b/include/linux/llist.h
@@ -142,6 +142,9 @@ static inline struct llist_node *llist_next(struct llist_node *node)
return node->next;
}
+extern bool llist_add_batch(struct llist_node *new_first,
+ struct llist_node *new_last,
+ struct llist_head *head);
/**
* llist_add - add a new entry
* @new: new entry to be added
@@ -151,18 +154,7 @@ static inline struct llist_node *llist_next(struct llist_node *node)
*/
static inline bool llist_add(struct llist_node *new, struct llist_head *head)
{
- struct llist_node *entry, *old_entry;
-
- entry = head->first;
- for (;;) {
- old_entry = entry;
- new->next = entry;
- entry = cmpxchg(&head->first, old_entry, new);
- if (entry == old_entry)
- break;
- }
-
- return old_entry == NULL;
+ return llist_add_batch(new, new, head);
}
/**
@@ -178,9 +170,6 @@ static inline struct llist_node *llist_del_all(struct llist_head *head)
return xchg(&head->first, NULL);
}
-extern bool llist_add_batch(struct llist_node *new_first,
- struct llist_node *new_last,
- struct llist_head *head);
extern struct llist_node *llist_del_first(struct llist_head *head);
#endif /* LLIST_H */
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
index a7b422b33eda6..aa5b582cc4711 100644
--- a/include/linux/sunrpc/rpc_pipe_fs.h
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
@@ -73,12 +73,12 @@ extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *,
extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *);
struct rpc_clnt;
-extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *);
+extern struct dentry *rpc_create_client_dir(struct dentry *, const char *, struct rpc_clnt *);
extern int rpc_remove_client_dir(struct dentry *);
struct cache_detail;
extern struct dentry *rpc_create_cache_dir(struct dentry *,
- struct qstr *,
+ const char *,
umode_t umode,
struct cache_detail *);
extern void rpc_remove_cache_dir(struct dentry *);
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
index 06632beaa6d51..05ac354e124de 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -84,10 +84,14 @@
#define O_PATH 010000000
#endif
-#ifndef O_TMPFILE
-#define O_TMPFILE 020000000
+#ifndef __O_TMPFILE
+#define __O_TMPFILE 020000000
#endif
+/* a horrid kludge trying to make sure that this will fail on old kernels */
+#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY | O_RDWR)
+#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT | O_ACCMODE)
+
#ifndef O_NDELAY
#define O_NDELAY O_NONBLOCK
#endif