diff options
| author | Greg Kroah-Hartman <gregkh@google.com> | 2021-04-07 13:34:18 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2021-04-07 13:34:18 +0200 |
| commit | 816b5bcff6fe2e18ee7e30a300c13e1e97d51f23 (patch) | |
| tree | 440ad4885111bdc92d9ae4be4a400d763cf178d6 /fs | |
| parent | 7a842f5f3a816a818dc89e4ec4cffb7a32a38543 (diff) | |
| parent | a0c646821e9dedc5368abd2f71f50ebe2c351d19 (diff) | |
Merge 4.4.265 into android-4.4-p
Changes in 4.4.265
selinux: vsock: Set SID for socket returned by accept()
ipv6: weaken the v4mapped source check
ext4: fix bh ref count on error paths
rpc: fix NULL dereference on kmalloc failure
ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10
ASoC: rt5651: Fix dac- and adc- vol-tlv values being off by a factor of 10
ASoC: sgtl5000: set DAP_AVC_CTRL register to correct default value on probe
scsi: st: Fix a use after free in st_open()
scsi: qla2xxx: Fix broken #endif placement
staging: comedi: cb_pcidas: fix request_irq() warn
staging: comedi: cb_pcidas64: fix request_irq() warn
ext4: do not iput inode under running transaction in ext4_rename()
appletalk: Fix skb allocation size in loopback case
net: wan/lmc: unregister device when no matching device is found
ALSA: usb-audio: Apply sample rate quirk to Logitech Connect
ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook
tracing: Fix stack trace event size
mm: fix race by making init_zero_pfn() early_initcall
reiserfs: update reiserfs_xattrs_initialized() condition
pinctrl: rockchip: fix restore error in resume
extcon: Fix error handling in extcon_dev_register
firewire: nosy: Fix a use-after-free bug in nosy_ioctl()
USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem
cdc-acm: fix BREAK rx code path adding necessary calls
USB: cdc-acm: downgrade message to debug
USB: cdc-acm: fix use-after-free after probe failure
staging: rtl8192e: Fix incorrect source in memcpy()
staging: rtl8192e: Change state information from u16 to u8
Linux 4.4.265
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I23368777e608080ef12898664935fe7394c5f40d
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ext4/inode.c | 6 | ||||
| -rw-r--r-- | fs/ext4/namei.c | 18 | ||||
| -rw-r--r-- | fs/reiserfs/xattr.h | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 33f74f8326a6..1c27c8993505 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1837,13 +1837,13 @@ static int __ext4_journalled_writepage(struct page *page, if (!ret) ret = err; - if (!ext4_has_inline_data(inode)) - ext4_walk_page_buffers(NULL, page_bufs, 0, len, - NULL, bput_one); ext4_set_inode_state(inode, EXT4_STATE_JDATA); out: unlock_page(page); out_no_pagelock: + if (!inline_data && page_bufs) + ext4_walk_page_buffers(NULL, page_bufs, 0, len, + NULL, bput_one); brelse(inode_bh); return ret; } diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 6168bcdadeba..f22fcb393684 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -3554,7 +3554,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, */ retval = -ENOENT; if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino) - goto end_rename; + goto release_bh; if ((old.dir != new.dir) && ext4_encrypted_inode(new.dir) && @@ -3569,7 +3569,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, if (IS_ERR(new.bh)) { retval = PTR_ERR(new.bh); new.bh = NULL; - goto end_rename; + goto release_bh; } if (new.bh) { if (!new.inode) { @@ -3586,15 +3586,13 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, handle = ext4_journal_start(old.dir, EXT4_HT_DIR, credits); if (IS_ERR(handle)) { retval = PTR_ERR(handle); - handle = NULL; - goto end_rename; + goto release_bh; } } else { whiteout = ext4_whiteout_for_rename(&old, credits, &handle); if (IS_ERR(whiteout)) { retval = PTR_ERR(whiteout); - whiteout = NULL; - goto end_rename; + goto release_bh; } } @@ -3702,16 +3700,18 @@ end_rename: ext4_resetent(handle, &old, old.inode->i_ino, old_file_type); drop_nlink(whiteout); + ext4_orphan_add(handle, whiteout); } unlock_new_inode(whiteout); + ext4_journal_stop(handle); iput(whiteout); - + } else { + ext4_journal_stop(handle); } +release_bh: brelse(old.dir_bh); brelse(old.bh); brelse(new.bh); - if (handle) - ext4_journal_stop(handle); return retval; } diff --git a/fs/reiserfs/xattr.h b/fs/reiserfs/xattr.h index 613ff5aef94e..19ca3745301f 100644 --- a/fs/reiserfs/xattr.h +++ b/fs/reiserfs/xattr.h @@ -42,7 +42,7 @@ void reiserfs_security_free(struct reiserfs_security_handle *sec); static inline int reiserfs_xattrs_initialized(struct super_block *sb) { - return REISERFS_SB(sb)->priv_root != NULL; + return REISERFS_SB(sb)->priv_root && REISERFS_SB(sb)->xattr_root; } #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
