Changes in 4.9.234 x86/asm: Remove unnecessary \n\t in front of CC_SET() from asm templates x86/asm: Add instruction suffixes to bitops drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() perf probe: Fix memory leakage when the probe point is not found tracing: Clean up the hwlat binding code tracing/hwlat: Honor the tracing_cpumask khugepaged: khugepaged_test_exit() check mmget_still_valid() khugepaged: adjust VM_BUG_ON_MM() in __khugepaged_enter() btrfs: export helpers for subvolume name/id resolution btrfs: don't show full path of bind mounts in subvol= romfs: fix uninitialized memory leak in romfs_dev_read() kernel/relay.c: fix memleak on destroy relay channel mm: include CMA pages in lowmem_reserve at boot mm, page_alloc: fix core hung in free_pcppages_bulk() ext4: clean up ext4_match() and callers ext4: fix checking of directory entry validity for inline directories scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices media: budget-core: Improve exception handling in budget_register() media: vpss: clean up resources in init Input: psmouse - add a newline when printing 'proto' by sysfs m68knommu: fix overwriting of bits in ColdFire V3 cache control xfs: fix inode quota reservation checks jffs2: fix UAF problem scsi: libfc: Free skb in fc_disc_gpn_id_resp() for valid cases virtio_ring: Avoid loop when vq is broken in virtqueue_poll xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init alpha: fix annotation of io{read,write}{16,32}be() ext4: fix potential negative array index in do_split() i40e: Set RX_ONLY mode for unicast promiscuous on VLAN net: fec: correct the error path for regulator disable in probe ASoC: intel: Fix memleak in sst_media_open net: dsa: b53: check for timeout powerpc/pseries: Do not initiate shutdown when system is running on UPS powerpc: Allow 4224 bytes of stack expansion for the signal frame epoll: Keep a reference on files added to the check list do_epoll_ctl(): clean the failure exits up a bit mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible xen: don't reschedule in preemption off sections KVM: arm/arm64: Don't reschedule in unmap_stage2_range() Linux 4.9.234 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iaa3dab59c039aac4a2e973a58c20ced48b09ac1e
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
/*
|
|
* Copyright (c) 2014 Red Hat, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it would be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write the Free Software Foundation,
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef __XFS_SYSFS_H__
|
|
#define __XFS_SYSFS_H__
|
|
|
|
extern struct kobj_type xfs_mp_ktype; /* xfs_mount */
|
|
extern struct kobj_type xfs_dbg_ktype; /* debug */
|
|
extern struct kobj_type xfs_log_ktype; /* xlog */
|
|
extern struct kobj_type xfs_stats_ktype; /* stats */
|
|
|
|
static inline struct xfs_kobj *
|
|
to_kobj(struct kobject *kobject)
|
|
{
|
|
return container_of(kobject, struct xfs_kobj, kobject);
|
|
}
|
|
|
|
static inline void
|
|
xfs_sysfs_release(struct kobject *kobject)
|
|
{
|
|
struct xfs_kobj *kobj = to_kobj(kobject);
|
|
complete(&kobj->complete);
|
|
}
|
|
|
|
static inline int
|
|
xfs_sysfs_init(
|
|
struct xfs_kobj *kobj,
|
|
struct kobj_type *ktype,
|
|
struct xfs_kobj *parent_kobj,
|
|
const char *name)
|
|
{
|
|
struct kobject *parent;
|
|
|
|
parent = parent_kobj ? &parent_kobj->kobject : NULL;
|
|
init_completion(&kobj->complete);
|
|
return kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name);
|
|
}
|
|
|
|
static inline void
|
|
xfs_sysfs_del(
|
|
struct xfs_kobj *kobj)
|
|
{
|
|
kobject_del(&kobj->kobject);
|
|
kobject_put(&kobj->kobject);
|
|
wait_for_completion(&kobj->complete);
|
|
}
|
|
|
|
int xfs_error_sysfs_init(struct xfs_mount *mp);
|
|
void xfs_error_sysfs_del(struct xfs_mount *mp);
|
|
|
|
#endif /* __XFS_SYSFS_H__ */
|