diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-06 17:07:31 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-06 17:07:31 -0700 |
commit | ab016fd8cfc4b7fefa7e555d6a4c9a9565059c3d (patch) | |
tree | 1e8c4aae8a0f3702039ac8226ec17833a9161aa4 /drivers/mtd | |
parent | 5bf9423e95a9e34c26d02f289337fe0b0aa9ada2 (diff) | |
parent | cdb58535895e51f28ba2c765c51bee160d1a4d30 (diff) |
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-android
* linux-linaro-lsk-v3.18: (237 commits)
Linux 3.18.19
x86/xen: allow privcmd hypercalls to be preempted
rtnl: restore notifications for deleted interfaces
Input: synaptics - add min/max quirk for Lenovo S540
Revert "Input: synaptics - add min/max quirk for Lenovo S540"
Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation"
fs/ufs: restore s_lock mutex_init()
ufs: Fix possible deadlock when looking up directories
ufs: Fix warning from unlock_new_inode()
vfs: Ignore unlocked mounts in fs_fully_visible
KVM: x86: properly restore LVT0
KVM: s390: virtio-ccw: don't overwrite config space values
selinux: fix setting of security labels on NFS
usb: gadget: f_fs: add extra check before unregister_gadget_item
perf/x86: Honor the architectural performance monitoring version
perf: Fix ring_buffer_attach() RCU sync, again
x86/boot: Fix overflow warning with 32-bit binutils
vfs: Remove incorrect debugging WARN in prepend_path
KVM: x86: make vapics_in_nmi_mode atomic
arm: KVM: force execution of HCPTR access on VM exit
...
Conflicts:
security/selinux/hooks.c
Resolution summary:
Conflict between upstream LTS commit f0f61c29dfb0 (selinux: fix
setting of security labels on NFS) and android-3.18 commit 96f8
bcf4a398 (pstore: selinux: add security in-core xattr support for
pstore and debugfs.) Resolution: simple combination.
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index d08229eb44d8..3a69b1e56908 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -200,6 +200,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/ mutex_lock(&dev->lock); + mutex_lock(&mtd_table_mutex); if (dev->open) goto unlock; @@ -223,6 +224,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) unlock: dev->open++; + mutex_unlock(&mtd_table_mutex); mutex_unlock(&dev->lock); blktrans_dev_put(dev); return ret; @@ -233,6 +235,7 @@ error_release: error_put: module_put(dev->tr->owner); kref_put(&dev->ref, blktrans_dev_release); + mutex_unlock(&mtd_table_mutex); mutex_unlock(&dev->lock); blktrans_dev_put(dev); return ret; @@ -246,6 +249,7 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode) return; mutex_lock(&dev->lock); + mutex_lock(&mtd_table_mutex); if (--dev->open) goto unlock; @@ -259,6 +263,7 @@ static void blktrans_release(struct gendisk *disk, fmode_t mode) __put_mtd_device(dev->mtd); } unlock: + mutex_unlock(&mtd_table_mutex); mutex_unlock(&dev->lock); blktrans_dev_put(dev); } |