summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-02-13 15:59:20 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-02-13 15:59:19 -0800
commit785e337e69484af1ada967bc41ae778c413695dd (patch)
tree00056309c227359bb88367cf4bd9c726341ca9ce /include
parente2a34f151c7bc7adb99fb673973fbef69e63dce6 (diff)
parentb4248fb5b9970c6c6ae704c5e910250170608c8d (diff)
Merge "Merge android-4.4.173 (64b5644) into msm-4.4"
Diffstat (limited to 'include')
-rw-r--r--include/linux/kobject.h17
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/net/ip_fib.h2
3 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 74de8b60ce12..41ba63c9a36e 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -113,6 +113,23 @@ extern void kobject_put(struct kobject *kobj);
extern const void *kobject_namespace(struct kobject *kobj);
extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
+/**
+ * kobject_has_children - Returns whether a kobject has children.
+ * @kobj: the object to test
+ *
+ * This will return whether a kobject has other kobjects as children.
+ *
+ * It does NOT account for the presence of attribute files, only sub
+ * directories. It also assumes there is no concurrent addition or
+ * removal of such children, and thus relies on external locking.
+ */
+static inline bool kobject_has_children(struct kobject *kobj)
+{
+ WARN_ON_ONCE(atomic_read(&kobj->kref.refcount) == 0);
+
+ return kobj->sd && kobj->sd->dir.subdirs;
+}
+
struct kobj_type {
void (*release)(struct kobject *kobj);
const struct sysfs_ops *sysfs_ops;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a490dd718654..6d39d81d3c38 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2798,6 +2798,7 @@ static inline unsigned char *skb_push_rcsum(struct sk_buff *skb,
*
* This is exactly the same as pskb_trim except that it ensures the
* checksum of received packets are still valid after the operation.
+ * It can change skb pointers.
*/
static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 2a25b53cd427..f6ff83b2ac87 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -200,7 +200,7 @@ int fib_table_insert(struct fib_table *, struct fib_config *);
int fib_table_delete(struct fib_table *, struct fib_config *);
int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
struct netlink_callback *cb);
-int fib_table_flush(struct fib_table *table);
+int fib_table_flush(struct fib_table *table, bool flush_all);
struct fib_table *fib_trie_unmerge(struct fib_table *main_tb);
void fib_table_flush_external(struct fib_table *table);
void fib_free_table(struct fib_table *tb);