{"push_id":879699564,"size":12,"distinct_size":12,"ref":"refs/heads/m","head":"2a57904ae05a164bd3179d55fa2fca41d6b29f5a","before":"b158f616259ea691badaad38306d41a5be14e195","commits":[{"sha":"a159280fdb6434a5f112dd60a4473665031f964b","author":{"email":"4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org","name":"Greg Kroah-Hartman"},"message":"sysfs.h: add ATTRIBUTE_GROUPS() macro\n\nTo make it easier for driver subsystems to work with attribute groups,\ncreate the ATTRIBUTE_GROUPS macro to remove some of the repetitive\ntyping for the most common use for attribute groups.\n\nChange-Id: Ic82d96490d47ac2afab19e30d12011a8cd27c450\nReviewed-by: Guenter Roeck <linux@roeck-us.net>\nTested-by: Guenter Roeck <linux@roeck-us.net>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/a159280fdb6434a5f112dd60a4473665031f964b"},{"sha":"69f0c61c3dd20e0ebde377079e51eda98f8895c4","author":{"email":"4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org","name":"Greg Kroah-Hartman"},"message":"sysfs.h: add BIN_ATTR macro\n\nThis makes it easier to create static binary attributes, which is needed\nin a number of drivers, instead of \"open coding\" them.\n\nChange-Id: I690ae46a42acb2b592abeb0323a08d2807935b2b\nReviewed-by: Guenter Roeck <linux@roeck-us.net>\nTested-by: Guenter Roeck <linux@roeck-us.net>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/69f0c61c3dd20e0ebde377079e51eda98f8895c4"},{"sha":"8271f5326b54842f61f3907209e03e8a9651d87c","author":{"email":"c539153ba1f947bd4b6f910263b967c4a0a62357@schinagl.nl","name":"Oliver Schinagl"},"message":"sysfs: add more helper macro's for (bin_)attribute(_groups)\n\nWith the recent changes to sysfs there's various helper macro's.\nHowever there's no RW, RO BIN_ helper macro's. This patch adds them.\n\nChange-Id: Ide8c5a19936ad993a346093274ad925b50016400\nSigned-off-by: Oliver Schinagl <oliver@schinagl.nl>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/8271f5326b54842f61f3907209e03e8a9651d87c"},{"sha":"1bc33e8165d63f6e8ac04296b3e09cbedb70192d","author":{"email":"c539153ba1f947bd4b6f910263b967c4a0a62357@schinagl.nl","name":"Oliver Schinagl"},"message":"sysfs: use file mode defines from stat.h\n\nWith the last patches stat.h was included to the header, and thus those\npermission defines should be used.\n\nChange-Id: Iee6ade4188c3aadc5dacdc9fc5a879b27d20414a\nSigned-off-by: Oliver Schinagl <oliver@schinagl.nl>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/1bc33e8165d63f6e8ac04296b3e09cbedb70192d"},{"sha":"98ae35da009160551978185d9edcac708e63f967","author":{"email":"4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org","name":"Greg Kroah-Hartman"},"message":"sysfs: create __ATTR_WO()\n\nThis creates the macro __ATTR_WO() for write-only attributes, instead of\nhaving to \"open define\" them.\n\nChange-Id: Id960410f861fae8c1e4167bf0bda644539f513b1\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/98ae35da009160551978185d9edcac708e63f967"},{"sha":"6f20695bfa2be1d0db13d0ae72f65e48e3d49260","author":{"email":"4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org","name":"Greg Kroah-Hartman"},"message":"driver core: device.h: add RW and RO attribute macros\n\nMake it easier to create attributes without having to always audit the\nmode settings.\n\nChange-Id: I94e4e4dd7d03807c6f5159078a471d3caaf4e373\nReviewed-by: Guenter Roeck <linux@roeck-us.net>\nTested-by: Guenter Roeck <linux@roeck-us.net>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/6f20695bfa2be1d0db13d0ae72f65e48e3d49260"},{"sha":"9387b7111db6e3dd6f7aabd71dfa5aad00bf2c8b","author":{"email":"4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org","name":"Greg Kroah-Hartman"},"message":"driver core: create write-only attribute macros for devices and drivers\n\nThis creates the macros DRIVER_ATTR_WO() and DEVICE_ATTR_WO() for\nwrite-only attributes for drivers and devices.\n\nChange-Id: I801c4b9cde8c2fb16d1de059bb1a6df2b3826359\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/9387b7111db6e3dd6f7aabd71dfa5aad00bf2c8b"},{"sha":"1561695afc0c012bc66e22108cd945908b463fe0","author":{"email":"6c55b1e1f53a3eae8a57c94118796a0d4fab02ed@gmail.com","name":"Ganesh Mahendran"},"message":"zram: use DEVICE_ATTR_[RW|RO|WO] to define zram sys device attribute\n\nIn current zram, we use DEVICE_ATTR() to define sys device attributes.\nSO, we need to set (S_IRUGO | S_IWUSR) permission and other arguments\nmanually.  Linux already provids the macro DEVICE_ATTR_[RW|RO|WO] to\ndefine sys device attribute.  It is simple and readable.\n\nThis patch uses kernel defined macro DEVICE_ATTR_[RW|RO|WO] to define\nzram device attribute.\n\nChange-Id: I8ed4ade90a5160947aaf851f620aca56f50892e0\nSigned-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/1561695afc0c012bc66e22108cd945908b463fe0"},{"sha":"ffaedc91057919a083147c9b187013544f718d64","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: clean up zram_meta_alloc()\n\nA trivial cleanup of zram_meta_alloc() error handling.\n\nChange-Id: Ia3d85aa47451be782876cdff56edad61ad1fc625\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/ffaedc91057919a083147c9b187013544f718d64"},{"sha":"b7a9dc31a9071e81974f62933f0c369dbc7cd0c7","author":{"email":"6c55b1e1f53a3eae8a57c94118796a0d4fab02ed@gmail.com","name":"Ganesh Mahendran"},"message":"zram: free meta table in zram_meta_free\n\nzram_meta_alloc() and zram_meta_free() are a pair.  In\nzram_meta_alloc(), meta table is allocated.  So it it better to free it\nin zram_meta_free().\n\nChange-Id: Ic46724200703151fa00e77868949c15699f5a87c\nSigned-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/b7a9dc31a9071e81974f62933f0c369dbc7cd0c7"},{"sha":"0c4a4e4425701a438886acf4a94de1d5764ccccd","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: fix umount-reset_store-mount race condition\n\nGanesh Mahendran was the first one who proposed to use bdev->bd_mutex to\navoid ->bd_holders race condition:\n\n        CPU0                            CPU1\numount /* zram->init_done is true */\nreset_store()\nbdev->bd_holders == 0                   mount\n...                                     zram_make_request()\nzram_reset_device()\n\nHowever, his solution required some considerable amount of code movement,\nwhich we can avoid.\n\nApart from using bdev->bd_mutex in reset_store(), this patch also\nsimplifies zram_reset_device().\n\nzram_reset_device() has a bool parameter reset_capacity which tells it\nwhether disk capacity and itself disk should be reset.  There are two\nzram_reset_device() callers:\n\n-- zram_exit() passes reset_capacity=false\n-- reset_store() passes reset_capacity=true\n\nSo we can move reset_capacity-sensitive work out of zram_reset_device()\nand perform it unconditionally in reset_store().  This also lets us drop\nreset_capacity parameter from zram_reset_device() and pass zram pointer\nonly.\n\nChange-Id: I0a05ca1a5355659e2b3858020d5d381ba174d811\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nReported-by: Ganesh Mahendran <opensource.ganesh@gmail.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Vlastimil Babka <vbabka@suse.cz>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/0c4a4e4425701a438886acf4a94de1d5764ccccd"},{"sha":"2a57904ae05a164bd3179d55fa2fca41d6b29f5a","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: rework reset and destroy path\n\nWe need to return set_capacity(disk, 0) from reset_store() back to\nzram_reset_device(), a catch by Ganesh Mahendran.  Potentially, we can\nrace set_capacity() calls from init and reset paths.\n\nThe problem is that zram_reset_device() is also getting called from\nzram_exit(), which performs operations in misleading reversed order -- we\nfirst create_device() and then init it, while zram_exit() perform\ndestroy_device() first and then does zram_reset_device().  This is done to\nremove sysfs group before we reset device, so we can continue with device\nreset/destruction not being raced by sysfs attr write (f.e.  disksize).\n\nApart from that, destroy_device() releases zram->disk (but we still have\n->disk pointer), so we cannot acces zram->disk in later\nzram_reset_device() call, which may cause additional errors in the future.\n\nSo, this patch rework and cleanup destroy path.\n\n1) remove several unneeded goto labels in zram_init()\n\n2) factor out zram_init() error path and zram_exit() into\n   destroy_devices() function, which takes the number of devices to\n   destroy as its argument.\n\n3) remove sysfs group in destroy_devices() first, so we can reorder\n   operations -- reset device (as expected) goes before disk destroy and\n   queue cleanup.  So we can always access ->disk in zram_reset_device().\n\n4) and, finally, return set_capacity() back under ->init_lock.\n\n[akpm@linux-foundation.org: tweak comment]\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nReported-by: Ganesh Mahendran <opensource.ganesh@gmail.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\nChange-Id: I4d77117510848d3a3ced611f52620ac34b699766","distinct":true,"url":"https://api.github.com/repos/moepda/android_kernel_moto_shamu/commits/2a57904ae05a164bd3179d55fa2fca41d6b29f5a"}]}