summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2019-09-09 11:06:27 +0530
committerSrinivasarao P <spathi@codeaurora.org>2019-09-09 11:30:20 +0530
commit4bd32b7ba749e007b5e2962e12c13afadee1e193 (patch)
treea362fef6427fe59b24c27b3daac86ee276a21280 /fs/gfs2
parent9c59fb632e3585fe24af1eb2420bafc5884c010d (diff)
parent6da3fbc3ec1e59c2aa5420597785b13c134edf6e (diff)
Merge android-4.4.191 (6da3fbc) into msm-4.4
* refs/heads/tmp-6da3fbc Linux 4.4.191 x86/ptrace: fix up botched merge of spectrev1 fix mac80211: fix possible sta leak Revert "cfg80211: fix processing world regdomain when non modular" VMCI: Release resource if the work is already queued stm class: Fix a double free of stm_source_device mmc: core: Fix init of SD cards reporting an invalid VDD range mmc: sdhci-of-at91: add quirk for broken HS200 uprobes/x86: Fix detection of 32-bit user mode ptrace,x86: Make user_64bit_mode() available to 32-bit builds USB: storage: ums-realtek: Whitelist auto-delink support USB: storage: ums-realtek: Update module parameter description for auto_delink_en usb: host: ohci: fix a race condition between shutdown and irq USB: cdc-wdm: fix race between write and disconnect due to flag abuse usb-storage: Add new JMS567 revision to unusual_devs x86/apic: Include the LDR when clearing out APIC registers x86/apic: Do not initialize LDR and DFR for bigsmp KVM: x86: Don't update RIP or do single-step on faulting emulation ALSA: seq: Fix potential concurrent access to the deleted pool tcp: make sure EPOLLOUT wont be missed ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue watchdog: bcm2835_wdt: Fix module autoload tools: hv: fix KVP and VSS daemons exit code usb: host: fotg2: restart hcd after port reset usb: gadget: composite: Clear "suspended" on reset/disconnect dmaengine: ste_dma40: fix unneeded variable warning scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume Revert "perf test 6: Fix missing kvm module load for s390" netfilter: conntrack: Use consistent ct id hash calculation netfilter: ctnetlink: don't use conntrack/expect object addresses as id inet: switch IP ID generator to siphash siphash: implement HalfSipHash1-3 for hash tables siphash: add cryptographically secure PRF vhost: scsi: add weight support vhost_net: fix possible infinite loop vhost: introduce vhost_exceeds_weight() vhost_net: introduce vhost_exceeds_weight() vhost_net: use packet weight for rx handler, too vhost-net: set packet weight of tx polling to 2 * vq size net: arc_emac: fix koops caused by sk_buff free GFS2: don't set rgrp gl_object until it's inserted into rgrp tree cgroup: Disable IRQs while holding css_set_lock dm table: fix invalid memory accesses with too high sector number dm space map metadata: fix missing store of apply_bops() return value dm btree: fix order of block initialization in btree_split_beneath x86/boot: Fix boot regression caused by bootparam sanitizing x86/boot: Save fields explicitly, zero out everything else x86/apic: Handle missing global clockevent gracefully x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx Revert "dm bufio: fix deadlock with loop device" HID: wacom: correct misreported EKR ring values selftests: kvm: Adding config fragments libata: add SG safety checks in SFF pio transfers net: hisilicon: Fix dma_map_single failed on arm64 net: hisilicon: fix hip04-xmit never return TX_BUSY net: hisilicon: make hip04_tx_reclaim non-reentrant net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() can: peak_usb: force the string buffer NULL-terminated can: sja1000: force the string buffer NULL-terminated perf bench numa: Fix cpu0 binding isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() net: usb: qmi_wwan: Add the BroadMobi BM818 card ASoC: ti: davinci-mcasp: Correct slot_width posed constraint st_nci_hci_connectivity_event_received: null check the allocation st21nfca_connectivity_event_received: null check the allocation can: dev: call netif_carrier_off() in register_candev() bonding: Force slave speed check after link state recovery for 802.3ad netfilter: ebtables: fix a memory leak bug in compat MIPS: kernel: only use i8253 clocksource with periodic clockevent HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT ANDROID: sched: Disallow WALT with CFS bandwidth control ANDROID: fiq_debugger: remove ANDROID: Add a tracepoint for mapping inode to full path Conflicts: drivers/scsi/ufs/ufshcd.c drivers/staging/android/fiq_debugger/fiq_debugger.c sound/usb/mixer.c Change-Id: I95d42e2ce37dd5d32e1737f701976079c43b7501 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/rgrp.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index ef24894edecc..9c159e6ad116 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -739,6 +739,7 @@ void gfs2_clear_rgrpd(struct gfs2_sbd *sdp)
gfs2_free_clones(rgd);
kfree(rgd->rd_bits);
+ rgd->rd_bits = NULL;
return_all_reservations(rgd);
kmem_cache_free(gfs2_rgrpd_cachep, rgd);
}
@@ -933,10 +934,6 @@ static int read_rindex_entry(struct gfs2_inode *ip)
if (error)
goto fail;
- rgd->rd_gl->gl_object = rgd;
- rgd->rd_gl->gl_vm.start = (rgd->rd_addr * bsize) & PAGE_CACHE_MASK;
- rgd->rd_gl->gl_vm.end = PAGE_CACHE_ALIGN((rgd->rd_addr +
- rgd->rd_length) * bsize) - 1;
rgd->rd_rgl = (struct gfs2_rgrp_lvb *)rgd->rd_gl->gl_lksb.sb_lvbptr;
rgd->rd_flags &= ~(GFS2_RDF_UPTODATE | GFS2_RDF_PREFERRED);
if (rgd->rd_data > sdp->sd_max_rg_data)
@@ -944,14 +941,20 @@ static int read_rindex_entry(struct gfs2_inode *ip)
spin_lock(&sdp->sd_rindex_spin);
error = rgd_insert(rgd);
spin_unlock(&sdp->sd_rindex_spin);
- if (!error)
+ if (!error) {
+ rgd->rd_gl->gl_object = rgd;
+ rgd->rd_gl->gl_vm.start = (rgd->rd_addr * bsize) & PAGE_MASK;
+ rgd->rd_gl->gl_vm.end = PAGE_ALIGN((rgd->rd_addr +
+ rgd->rd_length) * bsize) - 1;
return 0;
+ }
error = 0; /* someone else read in the rgrp; free it and ignore it */
gfs2_glock_put(rgd->rd_gl);
fail:
kfree(rgd->rd_bits);
+ rgd->rd_bits = NULL;
kmem_cache_free(gfs2_rgrpd_cachep, rgd);
return error;
}