stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Subject: [PATCH 3.10 013/123] UBIFS: remove mst_mutex
Date: Wed, 12 Nov 2014 10:16:19 +0900	[thread overview]
Message-ID: <20141112011719.594920095@linuxfoundation.org> (raw)
In-Reply-To: <20141112011718.985171261@linuxfoundation.org>

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

commit 07e19dff63e3d5d6500d831e36554ac9b1b0560e upstream.

The 'mst_mutex' is not needed since because 'ubifs_write_master()' is only
called on the mount path and commit path. The mount path is sequential and
there is no parallelism, and the commit path is also serialized - there is only
one commit going on at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ubifs/commit.c |    2 --
 fs/ubifs/master.c |    7 +++----
 fs/ubifs/super.c  |    1 -
 fs/ubifs/ubifs.h  |    2 --
 4 files changed, 3 insertions(+), 9 deletions(-)

--- a/fs/ubifs/commit.c
+++ b/fs/ubifs/commit.c
@@ -174,7 +174,6 @@ static int do_commit(struct ubifs_info *
 	if (err)
 		goto out;
 
-	mutex_lock(&c->mst_mutex);
 	c->mst_node->cmt_no      = cpu_to_le64(c->cmt_no);
 	c->mst_node->log_lnum    = cpu_to_le32(new_ltail_lnum);
 	c->mst_node->root_lnum   = cpu_to_le32(zroot.lnum);
@@ -204,7 +203,6 @@ static int do_commit(struct ubifs_info *
 	else
 		c->mst_node->flags &= ~cpu_to_le32(UBIFS_MST_NO_ORPHS);
 	err = ubifs_write_master(c);
-	mutex_unlock(&c->mst_mutex);
 	if (err)
 		goto out;
 
--- a/fs/ubifs/master.c
+++ b/fs/ubifs/master.c
@@ -352,10 +352,9 @@ int ubifs_read_master(struct ubifs_info
  * ubifs_write_master - write master node.
  * @c: UBIFS file-system description object
  *
- * This function writes the master node. The caller has to take the
- * @c->mst_mutex lock before calling this function. Returns zero in case of
- * success and a negative error code in case of failure. The master node is
- * written twice to enable recovery.
+ * This function writes the master node. Returns zero in case of success and a
+ * negative error code in case of failure. The master node is written twice to
+ * enable recovery.
  */
 int ubifs_write_master(struct ubifs_info *c)
 {
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1970,7 +1970,6 @@ static struct ubifs_info *alloc_ubifs_in
 		mutex_init(&c->lp_mutex);
 		mutex_init(&c->tnc_mutex);
 		mutex_init(&c->log_mutex);
-		mutex_init(&c->mst_mutex);
 		mutex_init(&c->umount_mutex);
 		mutex_init(&c->bu_mutex);
 		mutex_init(&c->write_reserve_mutex);
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1042,7 +1042,6 @@ struct ubifs_debug_info;
  *
  * @mst_node: master node
  * @mst_offs: offset of valid master node
- * @mst_mutex: protects the master node area, @mst_node, and @mst_offs
  *
  * @max_bu_buf_len: maximum bulk-read buffer length
  * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu
@@ -1282,7 +1281,6 @@ struct ubifs_info {
 
 	struct ubifs_mst_node *mst_node;
 	int mst_offs;
-	struct mutex mst_mutex;
 
 	int max_bu_buf_len;
 	struct mutex bu_mutex;



  parent reply	other threads:[~2014-11-12  1:16 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  1:16 [PATCH 3.10 000/123] 3.10.60-stable review Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 001/123] tracing/syscalls: Ignore numbers outside NR_syscalls range Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 002/123] ipv4: fix nexthop attlen check in fib_nh_match Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 003/123] ax88179_178a: fix bonding failure Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 004/123] ipv4: dst_entry leak in ip_send_unicast_reply() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 005/123] drivers/net: macvtap and tun depend on INET Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 006/123] lockd: Try to reconnect if statd has moved Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 007/123] Revert "percpu: free percpu allocation info for uniprocessor system" Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 008/123] pata_serverworks: disable 64-KB DMA transfers on Broadcom OSB4 IDE Controller Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 009/123] libata-sff: Fix controllers with no ctl port Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 010/123] mmc: rtsx_pci_sdmmc: fix incorrect last byte in R2 response Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 011/123] fs: make cont_expand_zero interruptible Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 012/123] fs: Fix theoretical division by 0 in super_cache_scan() Greg Kroah-Hartman
2014-11-12  1:16 ` Greg Kroah-Hartman [this message]
2014-11-12  1:16 ` [PATCH 3.10 014/123] UBIFS: fix a race condition Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 015/123] UBIFS: fix free log space calculation Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 016/123] vfs: fix data corruption when blocksize < pagesize for mmaped data Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 017/123] x86: Reject x32 executables if x32 ABI not supported Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 018/123] x86, fpu: __restore_xstate_sig()->math_state_restore() needs preempt_disable() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 019/123] x86, fpu: shift drop_init_fpu() from save_xstate_sig() to handle_signal() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 020/123] x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 021/123] x86_64, entry: Filter RFLAGS.NT on entry from userspace Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 022/123] x86_64, entry: Fix out of bounds read on sysenter Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 023/123] x86, pageattr: Prevent overflow in slow_virt_to_phys() for X86_PAE Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 024/123] evm: check xattr value length and type in evm_inode_setxattr() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 025/123] ALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat mode Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 026/123] [jffs2] kill wbuf_queued/wbuf_dwork_lock Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 027/123] fix misuses of f_count() in ppp and netlink Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 028/123] crypto: more robust crypto_memneq Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 029/123] random: add and use memzero_explicit() for clearing data Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 030/123] UBI: add missing kmem_cache_free() in process_pool_aeb error path Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 031/123] mnt: Prevent pivot_root from creating a loop in the mount tree Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 032/123] mfd: rtsx_pcr: Fix MSI enable error handling Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 033/123] pstore: Fix duplicate {console,ftrace}-efi entries Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 034/123] selinux: fix inode security list corruption Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 035/123] virtio_pci: fix virtio spec compliance on restore Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 036/123] dm bufio: update last_accessed when relinking a buffer Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 037/123] drbd: compute the end before rb_insert_augmented() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 038/123] block: fix alignment_offset math that assumes io_min is a power-of-2 Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 039/123] dm log userspace: fix memory leak in dm_ulog_tfr_init failure path Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 040/123] modules, lock around setting of MODULE_STATE_UNFORMED Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 041/123] framebuffer: fix border color Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 042/123] Input: i8042 - add noloop quirk for Asus X750LN Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 043/123] Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544 Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 044/123] drm/ast: Fix HW cursor image Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 045/123] drm/tilcdc: Fix the error path in tilcdc_load() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 046/123] drm/nouveau/bios: memset dcb struct to zero before parsing Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 047/123] media: v4l2-common: fix overflow in v4l_bound_align_image() Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 049/123] media: ds3000: fix LNB supply voltage on Tevii S480 on initialization Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 050/123] media: tda7432: Fix setting TDA7432_MUTE bit for TDA7432_RF register Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 051/123] kvm: fix excessive pages un-pinning in kvm_iommu_map error path Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 052/123] KVM: x86: Prevent host from panicking on shared MSR writes Greg Kroah-Hartman
2014-11-12  1:16 ` [PATCH 3.10 053/123] KVM: x86: Improve thread safety in pit Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 054/123] KVM: x86: Check non-canonical addresses upon WRMSR Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 055/123] kvm: x86: dont kill guest on unknown exit reason Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 056/123] KVM: x86: Fix wrong masking on relative jump/call Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 057/123] KVM: x86: Emulator fixes for eip canonical checks on near branches Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 058/123] ARC: [nsimosci] Allow "headless" models to boot Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 059/123] ARC: Update order of registers in KGDB to match GDB 7.5 Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 060/123] qla_target: dont delete changed nacls Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 061/123] target: Fix queue full status NULL pointer for SCF_TRANSPORT_TASK_SENSE Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 062/123] target: Fix APTPL metadata handling for dynamic MappedLUNs Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 063/123] MIPS: tlbex: Properly fix HUGE TLB Refill exception handler Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 064/123] jbd2: free bh when descriptor block checksum fails Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 065/123] ext4: check EA value offset when loading Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 066/123] ext4: dont check quota format when there are no quota files Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 067/123] ext4: grab missed write_count for EXT4_IOC_SWAP_BOOT Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 068/123] ext4: add ext4_iget_normal() which is to be used for dir tree lookups Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 069/123] ext4: fix reservation overflow in ext4_da_write_begin Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 070/123] ext4: check s_chksum_driver when looking for bg csum presence Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 071/123] ext4: fix overflow when updating superblock backups after resize Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 073/123] ext4: fix oops when loading block bitmap failed Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 074/123] freezer: Do not freeze tasks killed by OOM killer Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 075/123] OOM, PM: OOM killed task shouldnt escape PM suspend Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 076/123] staging:iio:ad5933: Fix NULL pointer deref when enabling buffer Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 077/123] staging:iio:ad5933: Drop "raw" from channel names Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 078/123] staging:iio:ade7758: Fix NULL pointer deref when enabling buffer Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 079/123] staging:iio:ade7758: Fix check if channels are enabled in prenable Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 080/123] staging:iio:ade7758: Remove "raw" from channel name Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 082/123] USB: serial: cp210x: add Silicon Labs 358x VID and PID Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 083/123] usb: serial: ftdi_sio: add Awinda Station and Dongle products Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 084/123] usb: serial: ftdi_sio: add "bricked" FTDI device PID Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 085/123] USB: cdc-acm: add device id for GW Instek AFG-2225 Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 086/123] USB: cdc-acm: only raise DTR on transitions from B0 Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 087/123] usb: option: add support for Telit LE910 Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 088/123] USB: option: add Haier CE81B CDMA modem Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 089/123] wireless: rt2x00: add new rt2800usb device Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 090/123] usb: dwc3: gadget: Properly initialize LINK TRB Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 091/123] spi: pl022: Fix incorrect dma_unmap_sg Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 092/123] spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 093/123] usb-storage: handle a skipped data phase Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 094/123] USB: opticon: fix non-atomic allocation in write path Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 095/123] usb: Do not allow usb_alloc_streams on unconfigured devices Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 096/123] cgroup/kmemleak: add kmemleak_free() for cgroup deallocations Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 097/123] lib/bitmap.c: fix undefined shift in __bitmap_shift_{left|right}() Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 098/123] scsi: Fix error handling in SCSI_IOCTL_SEND_COMMAND Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 099/123] i82860_edac: Report CE events properly Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 100/123] i3200_edac: " Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 101/123] e7xxx_edac: " Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 102/123] cpc925_edac: Report UE " Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 103/123] nfsd4: fix crash on unknown operation number Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 104/123] ext3: Dont check quota format when there are no quota files Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 105/123] quota: Properly return errors from dquot_writeback_dquots() Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 106/123] tty: Fix high cpu load if tty is unreleaseable Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 107/123] PM / Sleep: fix recovery during resuming from hibernation Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 108/123] mac80211: fix typo in starting baserate for rts_cts_rate_idx Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 109/123] posix-timers: Fix stack info leak in timer_create() Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 110/123] x86, apic: Handle a bad TSC more gracefully Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 111/123] mm: Remove false WARN_ON from pagecache_isize_extended() Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 112/123] crypto: algif - avoid excessive use of socket buffer in skcipher Greg Kroah-Hartman
2014-11-12  1:17 ` [PATCH 3.10 113/123] usb: dwc3: gadget: fix set_halt() bug with pending transfers Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 114/123] usb: gadget: function: acm: make f_acm pass USB20CV Chapter9 Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 115/123] usb: gadget: udc: core: fix kernel oops with soft-connect Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 116/123] drm/radeon: remove invalid pci id Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 117/123] rbd: Fix error recovery in rbd_obj_read_sync() Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 118/123] acer-wmi: Add acpi_backlight=video quirk for the Acer KAV80 Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 119/123] i2c: at91: dont account as iowait Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 120/123] sysfs: driver core: Fix glue dir race condition by gdp_mutex Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 121/123] of: Fix overflow bug in string property parsing functions Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 122/123] Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup Greg Kroah-Hartman
2014-11-12  1:18 ` [PATCH 3.10 123/123] libceph: ceph-msgr workqueue needs a resque worker Greg Kroah-Hartman
2014-11-12  5:21 ` [PATCH 3.10 000/123] 3.10.60-stable review Guenter Roeck
2014-11-12  6:22   ` Greg Kroah-Hartman
2014-11-12  7:22     ` Greg Kroah-Hartman
2014-11-12 16:18       ` Guenter Roeck
2014-11-12  6:31 ` Guenter Roeck
2014-11-13 15:25 ` Shuah Khan
2014-11-14 16:45   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141112011719.594920095@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).