From: Greg Kroah-Hartman Date: Wed, 22 Jan 2014 19:50:01 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.10.28~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32fd2a0b4dde4d2ca778459bcd1832309965e2d2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: gfs2-increase-i_writecount-during-gfs2_setattr_chown.patch staging-comedi-addi_apci_1032-fix-subdevice-type-flags-bug.patch staging-comedi-adl_pci9111-fix-incorrect-irq-passed-to-request_irq.patch --- diff --git a/queue-3.12/gfs2-increase-i_writecount-during-gfs2_setattr_chown.patch b/queue-3.12/gfs2-increase-i_writecount-during-gfs2_setattr_chown.patch new file mode 100644 index 00000000000..58b78d43213 --- /dev/null +++ b/queue-3.12/gfs2-increase-i_writecount-during-gfs2_setattr_chown.patch @@ -0,0 +1,59 @@ +From 62e96cf81988101fe9e086b2877307b6adda5197 Mon Sep 17 00:00:00 2001 +From: Bob Peterson +Date: Mon, 6 Jan 2014 17:16:01 -0500 +Subject: GFS2: Increase i_writecount during gfs2_setattr_chown + +From: Bob Peterson + +commit 62e96cf81988101fe9e086b2877307b6adda5197 upstream. + +This patch calls get_write_access in function gfs2_setattr_chown, +which merely increases inode->i_writecount for the duration of the +function. That will ensure that any file closes won't delete the +inode's multi-block reservation while the function is running. +It also ensures that a multi-block reservation exists when needed +for quota change operations during the chown. + +Signed-off-by: Bob Peterson +Signed-off-by: Steven Whitehouse +Signed-off-by: Greg Kroah-Hartman + +--- + fs/gfs2/inode.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +--- a/fs/gfs2/inode.c ++++ b/fs/gfs2/inode.c +@@ -1610,10 +1610,22 @@ static int setattr_chown(struct inode *i + if (!(attr->ia_valid & ATTR_GID) || gid_eq(ogid, ngid)) + ogid = ngid = NO_GID_QUOTA_CHANGE; + +- error = gfs2_quota_lock(ip, nuid, ngid); ++ error = get_write_access(inode); + if (error) + return error; + ++ error = gfs2_rs_alloc(ip); ++ if (error) ++ goto out; ++ ++ error = gfs2_rindex_update(sdp); ++ if (error) ++ goto out; ++ ++ error = gfs2_quota_lock(ip, nuid, ngid); ++ if (error) ++ goto out; ++ + if (!uid_eq(ouid, NO_UID_QUOTA_CHANGE) || + !gid_eq(ogid, NO_GID_QUOTA_CHANGE)) { + error = gfs2_quota_check(ip, nuid, ngid); +@@ -1640,6 +1652,8 @@ out_end_trans: + gfs2_trans_end(sdp); + out_gunlock_q: + gfs2_quota_unlock(ip); ++out: ++ put_write_access(inode); + return error; + } + diff --git a/queue-3.12/series b/queue-3.12/series index f44c161591e..d61b3895a80 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -1,2 +1,5 @@ revert-acpi-add-baytrail-soc-gpio-and-lpss-acpi-ids.patch perf-x86-amd-ibs-fix-waking-up-from-s3-for-amd-family-10h.patch +gfs2-increase-i_writecount-during-gfs2_setattr_chown.patch +staging-comedi-addi_apci_1032-fix-subdevice-type-flags-bug.patch +staging-comedi-adl_pci9111-fix-incorrect-irq-passed-to-request_irq.patch diff --git a/queue-3.12/staging-comedi-addi_apci_1032-fix-subdevice-type-flags-bug.patch b/queue-3.12/staging-comedi-addi_apci_1032-fix-subdevice-type-flags-bug.patch new file mode 100644 index 00000000000..d44ee4ddde3 --- /dev/null +++ b/queue-3.12/staging-comedi-addi_apci_1032-fix-subdevice-type-flags-bug.patch @@ -0,0 +1,33 @@ +From 90daf69a7a3f1d1a41018c799968a0bb896d65e0 Mon Sep 17 00:00:00 2001 +From: H Hartley Sweeten +Date: Mon, 9 Dec 2013 16:06:41 -0700 +Subject: staging: comedi: addi_apci_1032: fix subdevice type/flags bug + +From: H Hartley Sweeten + +commit 90daf69a7a3f1d1a41018c799968a0bb896d65e0 upstream. + +The SDF_CMD_READ should be one of the s->subdev_flags not part of +the s->type. + +Signed-off-by: H Hartley Sweeten +Reviewed-by: Ian Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers/addi_apci_1032.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/comedi/drivers/addi_apci_1032.c ++++ b/drivers/staging/comedi/drivers/addi_apci_1032.c +@@ -325,8 +325,8 @@ static int apci1032_auto_attach(struct c + s = &dev->subdevices[1]; + if (dev->irq) { + dev->read_subdev = s; +- s->type = COMEDI_SUBD_DI | SDF_CMD_READ; +- s->subdev_flags = SDF_READABLE; ++ s->type = COMEDI_SUBD_DI; ++ s->subdev_flags = SDF_READABLE | SDF_CMD_READ; + s->n_chan = 1; + s->maxdata = 1; + s->range_table = &range_digital; diff --git a/queue-3.12/staging-comedi-adl_pci9111-fix-incorrect-irq-passed-to-request_irq.patch b/queue-3.12/staging-comedi-adl_pci9111-fix-incorrect-irq-passed-to-request_irq.patch new file mode 100644 index 00000000000..9e947b10571 --- /dev/null +++ b/queue-3.12/staging-comedi-adl_pci9111-fix-incorrect-irq-passed-to-request_irq.patch @@ -0,0 +1,32 @@ +From 48108fe3daa0d142f9b97178fdb23704ea3a407b Mon Sep 17 00:00:00 2001 +From: H Hartley Sweeten +Date: Thu, 5 Dec 2013 13:43:28 -0700 +Subject: staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq() + +From: H Hartley Sweeten + +commit 48108fe3daa0d142f9b97178fdb23704ea3a407b upstream. + +The dev->irq passed to request_irq() will always be 0 when the auto_attach +function is called. The pcidev->irq should be used instead to get the correct +irq number. + +Signed-off-by: H Hartley Sweeten +Reviewed-by: Ian Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers/adl_pci9111.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/comedi/drivers/adl_pci9111.c ++++ b/drivers/staging/comedi/drivers/adl_pci9111.c +@@ -869,7 +869,7 @@ static int pci9111_auto_attach(struct co + pci9111_reset(dev); + + if (pcidev->irq > 0) { +- ret = request_irq(dev->irq, pci9111_interrupt, ++ ret = request_irq(pcidev->irq, pci9111_interrupt, + IRQF_SHARED, dev->board_name, dev); + if (ret) + return ret;