/* Drop a reference to the resource addressed by a key. The hash bucket spinlock must not be held.  */
static void drop_futex_key_refs(union futex_key *key)
/* Drop a reference to the resource addressed by a key. The hash bucket spinlock must not be held.  */
static void drop_futex_key_refs(union futex_key *key)
{
	if (!key->both.ptr) {
		WARN_ON_ONCE(1);
		return;
	}
	switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
	case FUT_OFF_INODE:
		iput(key->shared.inode);
		break;
	case FUT_OFF_MMSHARED:
		mmdrop(key->private.mm);
		break;
	}
}