Linux v3.17-7639-g90eac7eee2f4
This commit is contained in:
parent
dc79a66f2e
commit
91dcc1748d
@ -1,90 +0,0 @@
|
||||
From: Bob Peterson <rpeterso@redhat.com>
|
||||
Date: Mon, 29 Sep 2014 08:52:04 -0400
|
||||
Subject: [PATCH] GFS2: Make rename not save dirent location
|
||||
|
||||
This patch fixes a regression in the patch "GFS2: Remember directory
|
||||
insert point", commit 2b47dad866d04f14c328f888ba5406057b8c7d33.
|
||||
The problem had to do with the rename function: The function found
|
||||
space for the new dirent, and remembered that location. But then the
|
||||
old dirent was removed, which often moved the eligible location for
|
||||
the renamed dirent. Putting the new dirent at the saved location
|
||||
caused file system corruption.
|
||||
|
||||
This patch adds a new "save_loc" variable to struct gfs2_diradd.
|
||||
If 1, the dirent location is saved. If 0, the dirent location is not
|
||||
saved and the buffer_head is released as per previous behavior.
|
||||
|
||||
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
|
||||
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
|
||||
---
|
||||
fs/gfs2/dir.c | 9 +++++++--
|
||||
fs/gfs2/dir.h | 1 +
|
||||
fs/gfs2/inode.c | 6 +++---
|
||||
3 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
|
||||
index 1a349f9a9685..5d4261ff5d23 100644
|
||||
--- a/fs/gfs2/dir.c
|
||||
+++ b/fs/gfs2/dir.c
|
||||
@@ -2100,8 +2100,13 @@ int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name,
|
||||
}
|
||||
if (IS_ERR(dent))
|
||||
return PTR_ERR(dent);
|
||||
- da->bh = bh;
|
||||
- da->dent = dent;
|
||||
+
|
||||
+ if (da->save_loc) {
|
||||
+ da->bh = bh;
|
||||
+ da->dent = dent;
|
||||
+ } else {
|
||||
+ brelse(bh);
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
|
||||
index 126c65dda028..e1b309c24dab 100644
|
||||
--- a/fs/gfs2/dir.h
|
||||
+++ b/fs/gfs2/dir.h
|
||||
@@ -23,6 +23,7 @@ struct gfs2_diradd {
|
||||
unsigned nr_blocks;
|
||||
struct gfs2_dirent *dent;
|
||||
struct buffer_head *bh;
|
||||
+ int save_loc;
|
||||
};
|
||||
|
||||
extern struct inode *gfs2_dir_search(struct inode *dir,
|
||||
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
|
||||
index fc8ac2ee0667..7d2723ce067e 100644
|
||||
--- a/fs/gfs2/inode.c
|
||||
+++ b/fs/gfs2/inode.c
|
||||
@@ -600,7 +600,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
|
||||
int error, free_vfs_inode = 0;
|
||||
u32 aflags = 0;
|
||||
unsigned blocks = 1;
|
||||
- struct gfs2_diradd da = { .bh = NULL, };
|
||||
+ struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
|
||||
|
||||
if (!name->len || name->len > GFS2_FNAMESIZE)
|
||||
return -ENAMETOOLONG;
|
||||
@@ -899,7 +899,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
|
||||
struct gfs2_inode *ip = GFS2_I(inode);
|
||||
struct gfs2_holder ghs[2];
|
||||
struct buffer_head *dibh;
|
||||
- struct gfs2_diradd da = { .bh = NULL, };
|
||||
+ struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
|
||||
int error;
|
||||
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
@@ -1337,7 +1337,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
|
||||
struct gfs2_rgrpd *nrgd;
|
||||
unsigned int num_gh;
|
||||
int dir_rename = 0;
|
||||
- struct gfs2_diradd da = { .nr_blocks = 0, };
|
||||
+ struct gfs2_diradd da = { .nr_blocks = 0, .save_loc = 0, };
|
||||
unsigned int x;
|
||||
int error;
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
@ -554,6 +554,8 @@ CONFIG_SPI_DW_MMIO=m
|
||||
CONFIG_SPI_DW_PCI=m
|
||||
# CONFIG_MMC_DW_IDMAC is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
# CONFIG_MMC_QCOM_DML is not set
|
||||
# CONFIG_MMC_DW_ROCKCHIP is not set
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_HOST=m
|
||||
CONFIG_USB_DWC2_PLATFORM=y
|
||||
@ -629,10 +631,18 @@ CONFIG_SND_SOC_SPDIF=m
|
||||
# CONFIG_SND_SOC_ALC5623 is not set
|
||||
# CONFIG_SND_SOC_CS42L56 is not set
|
||||
# CONFIG_SND_SOC_STA350 is not set
|
||||
# CONFIG_SND_SOC_CS35L32 is not set
|
||||
# CONFIG_SND_SOC_ES8328 is not set
|
||||
# CONFIG_SND_SOC_SSM2602_SPI is not set
|
||||
# CONFIG_SND_SOC_SSM2602_I2C is not set
|
||||
# CONFIG_SND_SOC_SSM4567 is not set
|
||||
# CONFIG_SND_SOC_WM8978 is not set
|
||||
# CONFIG_SND_ATMEL_SOC is not set
|
||||
# CONFIG_SND_SOC_TLV320AIC31XX is not set
|
||||
# CONFIG_SND_SOC_TAS2552 is not set
|
||||
# CONFIG_SND_SOC_CS4265 is not set
|
||||
# CONFIG_SND_SOC_IMX_ES8328 is not set
|
||||
# CONFIG_SND_SOC_FSL_ASOC_CARD is not set
|
||||
# CONFIG_SND_EDMA_SOC is not set
|
||||
# CONFIG_SND_SOC_ROCKCHIP is not set
|
||||
|
||||
|
@ -3111,6 +3111,8 @@ CONFIG_VIDEO_TM6000_DVB=m
|
||||
CONFIG_VIDEO_TLG2300=m
|
||||
# CONFIG_VIDEO_TIMBERDALE is not set
|
||||
# CONFIG_VIDEO_M5MOLS is not set
|
||||
# CONFIG_VIDEO_TW68 is not set
|
||||
# CONFIG_VIDEO_VIVID is not set
|
||||
# CONFIG_EXYNOS_VIDEO is not set
|
||||
CONFIG_VIDEO_USBTV=m
|
||||
# CONFIG_VIDEO_AU0828_RC is not set
|
||||
@ -3151,6 +3153,7 @@ CONFIG_DVB_DYNAMIC_MINORS=y
|
||||
CONFIG_DVB_BT8XX=m
|
||||
CONFIG_DVB_BUDGET_CORE=m
|
||||
CONFIG_DVB_PLUTO2=m
|
||||
# CONFIG_DVB_PT3 is not set
|
||||
CONFIG_SMS_SIANO_MDTV=m
|
||||
CONFIG_SMS_SIANO_RC=y
|
||||
# CONFIG_SMS_SIANO_DEBUGFS is not set
|
||||
@ -3218,6 +3221,7 @@ CONFIG_DVB_USB_AZ6007=m
|
||||
CONFIG_DVB_USB_LME2510=m
|
||||
CONFIG_DVB_USB_RTL28XXU=m
|
||||
CONFIG_DVB_USB_AF9035=m
|
||||
CONFIG_DVB_USB_DVBSKY=m
|
||||
|
||||
CONFIG_DVB_PT1=m
|
||||
|
||||
@ -3263,6 +3267,7 @@ CONFIG_IR_IGUANA=m
|
||||
CONFIG_IR_TTUSBIR=m
|
||||
CONFIG_IR_GPIO_CIR=m
|
||||
CONFIG_IR_XMP_DECODER=m
|
||||
CONFIG_IR_HIX5HD2=m
|
||||
|
||||
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||
# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set
|
||||
@ -4051,6 +4056,7 @@ CONFIG_MFD_VIPERBOARD=m
|
||||
# CONFIG_MFD_TPS65912_SPI is not set
|
||||
# CONFIG_MFD_MC13XXX_SPI is not set
|
||||
# CONFIG_MFD_DA9052_SPI is not set
|
||||
# CONFIG_MFD_MENF21BMC is not set
|
||||
# CONFIG_EZX_PCAP is not set
|
||||
# CONFIG_INTEL_SOC_PMIC is not set
|
||||
|
||||
|
@ -171,6 +171,7 @@ CONFIG_CRYPTO_842=m
|
||||
CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
|
||||
CONFIG_CRYPTO_DEV_NX_COMPRESS=m
|
||||
|
||||
CONFIG_CXL=m
|
||||
|
||||
CONFIG_BPF_JIT=y
|
||||
# CONFIG_PPC_ICSWX_PID is not set
|
||||
|
@ -161,6 +161,7 @@ CONFIG_CRYPTO_842=m
|
||||
CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
|
||||
CONFIG_CRYPTO_DEV_NX_COMPRESS=m
|
||||
|
||||
CONFIG_CXL=m
|
||||
|
||||
CONFIG_BPF_JIT=y
|
||||
# CONFIG_PPC_ICSWX_PID is not set
|
||||
|
@ -293,6 +293,8 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
|
||||
CONFIG_XEN_SELFBALLOONING=y
|
||||
CONFIG_XEN_PCIDEV_BACKEND=m
|
||||
CONFIG_XEN_ACPI_PROCESSOR=m
|
||||
# CONFIG_XEN_SCSI_FRONTEND is not set
|
||||
# CONFIG_XEN_SCSI_BACKEND is not set
|
||||
|
||||
CONFIG_MTD_ESB2ROM=m
|
||||
CONFIG_MTD_CK804XROM=m
|
||||
|
@ -69,7 +69,7 @@ Summary: The Linux kernel
|
||||
# The rc snapshot level
|
||||
%define rcrev 0
|
||||
# The git snapshot level
|
||||
%define gitrev 4
|
||||
%define gitrev 5
|
||||
# Set rpm version accordingly
|
||||
%define rpmversion 3.%{upstream_sublevel}.0
|
||||
%endif
|
||||
@ -610,8 +610,6 @@ Patch26021: drm-vmwgfx-Fix-drm.h-include.patch
|
||||
#rhbz 1145318
|
||||
Patch26029: KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch
|
||||
|
||||
Patch26030: GFS2-Make-rename-not-save-dirent-location.patch
|
||||
|
||||
Patch26032: Revert-pinctrl-qcom-use-restart_notifier-mechanism-f.patch
|
||||
|
||||
#CVE-2014-7970 rhbz 1151095 1151484
|
||||
@ -1339,8 +1337,6 @@ ApplyPatch drm-vmwgfx-Fix-drm.h-include.patch
|
||||
#rhbz 1145318
|
||||
ApplyPatch KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch
|
||||
|
||||
ApplyPatch GFS2-Make-rename-not-save-dirent-location.patch
|
||||
|
||||
ApplyPatch Revert-pinctrl-qcom-use-restart_notifier-mechanism-f.patch
|
||||
|
||||
#CVE-2014-7970 rhbz 1151095 1151484
|
||||
@ -2214,6 +2210,9 @@ fi
|
||||
# ||----w |
|
||||
# || ||
|
||||
%changelog
|
||||
* Sun Oct 12 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git5.1
|
||||
- Linux v3.17-7639-g90eac7eee2f4
|
||||
|
||||
* Sun Oct 12 2014 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Enable CONFIG_I2C_DESIGNWARE_PCI (rhbz 1045821)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user