You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Just simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -146,8 +146,8 @@ EXPORT_SYMBOL(idr_get_next_ext);
|
||||
* idr_alloc() and idr_remove() (as long as the ID being removed is not
|
||||
* the one being replaced!).
|
||||
*
|
||||
* Returns: 0 on success. %-ENOENT indicates that @id was not found.
|
||||
* %-EINVAL indicates that @id or @ptr were not valid.
|
||||
* Returns: the old value on success. %-ENOENT indicates that @id was not
|
||||
* found. %-EINVAL indicates that @id or @ptr were not valid.
|
||||
*/
|
||||
void *idr_replace(struct idr *idr, void *ptr, int id)
|
||||
{
|
||||
|
||||
+41
-8
@@ -343,6 +343,26 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void zap_modalias_env(struct kobj_uevent_env *env)
|
||||
{
|
||||
static const char modalias_prefix[] = "MODALIAS=";
|
||||
int i;
|
||||
|
||||
for (i = 0; i < env->envp_idx;) {
|
||||
if (strncmp(env->envp[i], modalias_prefix,
|
||||
sizeof(modalias_prefix) - 1)) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i != env->envp_idx - 1)
|
||||
memmove(&env->envp[i], &env->envp[i + 1],
|
||||
sizeof(env->envp[i]) * env->envp_idx - 1);
|
||||
|
||||
env->envp_idx--;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* kobject_uevent_env - send an uevent with environmental data
|
||||
*
|
||||
@@ -455,16 +475,29 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark "add" and "remove" events in the object to ensure proper
|
||||
* events to userspace during automatic cleanup. If the object did
|
||||
* send an "add" event, "remove" will automatically generated by
|
||||
* the core, if not already done by the caller.
|
||||
*/
|
||||
if (action == KOBJ_ADD)
|
||||
switch (action) {
|
||||
case KOBJ_ADD:
|
||||
/*
|
||||
* Mark "add" event so we can make sure we deliver "remove"
|
||||
* event to userspace during automatic cleanup. If
|
||||
* the object did send an "add" event, "remove" will
|
||||
* automatically generated by the core, if not already done
|
||||
* by the caller.
|
||||
*/
|
||||
kobj->state_add_uevent_sent = 1;
|
||||
else if (action == KOBJ_REMOVE)
|
||||
break;
|
||||
|
||||
case KOBJ_REMOVE:
|
||||
kobj->state_remove_uevent_sent = 1;
|
||||
break;
|
||||
|
||||
case KOBJ_UNBIND:
|
||||
zap_modalias_env(env);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
mutex_lock(&uevent_sock_mutex);
|
||||
/* we will send an event, so request a new sequence number */
|
||||
|
||||
@@ -85,8 +85,8 @@ static FORCE_INLINE int LZ4_decompress_generic(
|
||||
const BYTE * const lowLimit = lowPrefix - dictSize;
|
||||
|
||||
const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize;
|
||||
const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
|
||||
const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
||||
static const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
|
||||
static const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
||||
|
||||
const int safeDecode = (endOnInput == endOnInputSize);
|
||||
const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB)));
|
||||
|
||||
+3
-1
@@ -48,7 +48,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
|
||||
if (time_is_before_jiffies(rs->begin + rs->interval)) {
|
||||
if (rs->missed) {
|
||||
if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
|
||||
pr_warn("%s: %d callbacks suppressed\n", func, rs->missed);
|
||||
printk_deferred(KERN_WARNING
|
||||
"%s: %d callbacks suppressed\n",
|
||||
func, rs->missed);
|
||||
rs->missed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user