summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2018-11-28 11:42:49 +0530
committerSrinivasarao P <spathi@codeaurora.org>2018-11-28 11:43:50 +0530
commit0a858409d5cd7283b8720d989bd2dba3f9353a6c (patch)
tree6eb6fa078ff6630011688a9b57b6059e80f00401 /drivers/block
parentf96a043350c0f9490ec98b48aecfcd6a8c477a98 (diff)
parentf34ff9e87b0564bd2ac1f3611d40313e80d20224 (diff)
Merge android-4.4.165 (f34ff9e) into msm-4.4
* refs/heads/tmp-f34ff9e Linux 4.4.165 xhci: Fix USB3 NULL pointer dereference at logical disconnect. HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges new helper: uaccess_kernel() ACPI / platform: Add SMB0001 HID to forbidden_id_list drivers/misc/sgi-gru: fix Spectre v1 vulnerability USB: misc: appledisplay: add 20" Apple Cinema Display misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB USB: quirks: Add no-lpm quirk for Raydium touchscreens usb: cdc-acm: add entry for Hiro (Conexant) modem uio: Fix an Oops on load media: v4l: event: Add subscription to list before calling "add" operation Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV" Revert "media: videobuf2-core: don't call memop 'finish' when queueing" btrfs: fix pinned underflow after transaction aborted gfs2: Put bitmap buffers in put_super SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() zram: close udev startup race condition as default groups lib/raid6: Fix arm64 test build hwmon: (ibmpowernv) Remove bogus __init annotations netfilter: xt_IDLETIMER: add sysfs filename checking routine netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() s390/mm: Fix ERROR: "__node_distance" undefined! netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net s390/vdso: add missing FORCE to build targets arm64: percpu: Initialize ret in the default case platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307 clk: samsung: exynos5420: Enable PERIS clocks for suspend fs/exofs: fix potential memory leak in mount option parsing um: Give start_idle_thread() a return code hfsplus: prevent btree data loss on root split hfs: prevent btree data loss on root split reiserfs: propagate errors from fill_with_dentries() properly x86/build: Use cc-option to validate stack alignment parameter x86/build: Fix stack alignment for CLang x86/boot: #undef memcpy() et al in string.c x86/build: Specify stack alignment for clang x86/build: Use __cc-option for boot code compiler options kbuild: Add __cc-option macro x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility crypto, x86: aesni - fix token pasting for clang x86/kbuild: Use cc-option to enable -falign-{jumps/loops} arm64: Disable asm-operand-width warning for clang kbuild: allow to use GCC toolchain not in Clang search path kbuild: set no-integrated-as before incl. arch Makefile kbuild: clang: disable unused variable warnings only when constant kbuild: clang: remove crufty HOSTCFLAGS kbuild: clang: fix build failures with sparse check kbuild: move cc-option and cc-disable-warning after incl. arch Makefile kbuild: Set KBUILD_CFLAGS before incl. arch Makefile kbuild: fix linker feature test macros when cross compiling with Clang efi/libstub/arm64: Set -fpie when building the EFI stub efi/libstub/arm64: Force 'hidden' visibility for section markers crypto: arm64/sha - avoid non-standard inline asm tricks kbuild: clang: Disable 'address-of-packed-member' warning modules: mark __inittest/__exittest as __maybe_unused kbuild: Add support to generate LLVM assembly files kbuild: use -Oz instead of -Os when using clang kbuild, LLVMLinux: Add -Werror to cc-option to support clang kbuild: drop -Wno-unknown-warning-option from clang options kbuild: fix asm-offset generation to work with clang kbuild: consolidate redundant sed script ASM offset generation kbuild: Consolidate header generation from ASM offset information kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS kbuild: Add better clang cross build support ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths net-gro: reset skb->pkt_type in napi_reuse_skb() ip_tunnel: don't force DF when MTU is locked flow_dissector: do not dissect l4 ports for fragments Conflicts: arch/um/os-Linux/skas/process.c Change-Id: I6587d94332e204c068f7d44428a2ec1280bc3a7f Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/zram/zram_drv.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 418243fab5d2..a3abe6e89e4e 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1639,6 +1639,11 @@ static const struct attribute_group zram_disk_attr_group = {
.attrs = zram_disk_attrs,
};
+static const struct attribute_group *zram_disk_attr_groups[] = {
+ &zram_disk_attr_group,
+ NULL,
+};
+
/*
* Allocate and initialize new zram device. the function returns
* '>= 0' device_id upon success, and negative value otherwise.
@@ -1721,24 +1726,15 @@ static int zram_add(void)
zram->disk->queue->backing_dev_info->capabilities |=
BDI_CAP_STABLE_WRITES;
+ disk_to_dev(zram->disk)->groups = zram_disk_attr_groups;
add_disk(zram->disk);
- ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj,
- &zram_disk_attr_group);
- if (ret < 0) {
- pr_err("Error creating sysfs group for device %d\n",
- device_id);
- goto out_free_disk;
- }
strlcpy(zram->compressor, default_compressor, sizeof(zram->compressor));
zram_debugfs_register(zram);
pr_info("Added device: %s\n", zram->disk->disk_name);
return device_id;
-out_free_disk:
- del_gendisk(zram->disk);
- put_disk(zram->disk);
out_free_queue:
blk_cleanup_queue(queue);
out_free_idr:
@@ -1767,15 +1763,6 @@ static int zram_remove(struct zram *zram)
mutex_unlock(&bdev->bd_mutex);
zram_debugfs_unregister(zram);
- /*
- * Remove sysfs first, so no one will perform a disksize
- * store while we destroy the devices. This also helps during
- * hot_remove -- zram_reset_device() is the last holder of
- * ->init_lock, no later/concurrent disksize_store() or any
- * other sysfs handlers are possible.
- */
- sysfs_remove_group(&disk_to_dev(zram->disk)->kobj,
- &zram_disk_attr_group);
/* Make sure all the pending I/O are finished */
fsync_bdev(bdev);