diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-02-13 15:59:20 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-13 15:59:19 -0800 |
| commit | 785e337e69484af1ada967bc41ae778c413695dd (patch) | |
| tree | 00056309c227359bb88367cf4bd9c726341ca9ce /include/linux | |
| parent | e2a34f151c7bc7adb99fb673973fbef69e63dce6 (diff) | |
| parent | b4248fb5b9970c6c6ae704c5e910250170608c8d (diff) | |
Merge "Merge android-4.4.173 (64b5644) into msm-4.4"
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kobject.h | 17 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 1 |
2 files changed, 18 insertions, 0 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) |
