diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 14:23:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 14:23:35 -0500 |
commit | 391f2a16b74b95da2f05a607f53213fc8ed24b8e (patch) | |
tree | 93bfd1906778d7ff24f6ce7c03f2e7c0f91caef5 /fs/ext4/inline.c | |
parent | d5ffdf8b4ac6e6db5702ba31870c476d5fa30660 (diff) | |
parent | 68ce7bfcd995a8a393b1b14fa67dbc16fa3dc784 (diff) |
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o:
"Some locking and page fault bug fixes from Jan Kara, some ext4
encryption fixes from me, and Li Xi's Project Quota commits"
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
fs: clean up the flags definition in uapi/linux/fs.h
ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support
ext4: add project quota support
ext4: adds project ID support
ext4 crypto: simplify interfaces to directory entry insert functions
ext4 crypto: add missing locking for keyring_key access
ext4: use pre-zeroed blocks for DAX page faults
ext4: implement allocation of pre-zeroed blocks
ext4: provide ext4_issue_zeroout()
ext4: get rid of EXT4_GET_BLOCKS_NO_LOCK flag
ext4: document lock ordering
ext4: fix races of writeback with punch hole and zero range
ext4: fix races between buffered IO and collapse / insert range
ext4: move unlocked dio protection from ext4_alloc_file_blocks()
ext4: fix races between page faults and hole punching
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r-- | fs/ext4/inline.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index d884989cc83d..dfe3b9bafc0d 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c | |||
@@ -995,12 +995,11 @@ void ext4_show_inline_dir(struct inode *dir, struct buffer_head *bh, | |||
995 | */ | 995 | */ |
996 | static int ext4_add_dirent_to_inline(handle_t *handle, | 996 | static int ext4_add_dirent_to_inline(handle_t *handle, |
997 | struct ext4_filename *fname, | 997 | struct ext4_filename *fname, |
998 | struct dentry *dentry, | 998 | struct inode *dir, |
999 | struct inode *inode, | 999 | struct inode *inode, |
1000 | struct ext4_iloc *iloc, | 1000 | struct ext4_iloc *iloc, |
1001 | void *inline_start, int inline_size) | 1001 | void *inline_start, int inline_size) |
1002 | { | 1002 | { |
1003 | struct inode *dir = d_inode(dentry->d_parent); | ||
1004 | int err; | 1003 | int err; |
1005 | struct ext4_dir_entry_2 *de; | 1004 | struct ext4_dir_entry_2 *de; |
1006 | 1005 | ||
@@ -1245,12 +1244,11 @@ out: | |||
1245 | * the new created block. | 1244 | * the new created block. |
1246 | */ | 1245 | */ |
1247 | int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, | 1246 | int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, |
1248 | struct dentry *dentry, struct inode *inode) | 1247 | struct inode *dir, struct inode *inode) |
1249 | { | 1248 | { |
1250 | int ret, inline_size; | 1249 | int ret, inline_size; |
1251 | void *inline_start; | 1250 | void *inline_start; |
1252 | struct ext4_iloc iloc; | 1251 | struct ext4_iloc iloc; |
1253 | struct inode *dir = d_inode(dentry->d_parent); | ||
1254 | 1252 | ||
1255 | ret = ext4_get_inode_loc(dir, &iloc); | 1253 | ret = ext4_get_inode_loc(dir, &iloc); |
1256 | if (ret) | 1254 | if (ret) |
@@ -1264,7 +1262,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, | |||
1264 | EXT4_INLINE_DOTDOT_SIZE; | 1262 | EXT4_INLINE_DOTDOT_SIZE; |
1265 | inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE; | 1263 | inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE; |
1266 | 1264 | ||
1267 | ret = ext4_add_dirent_to_inline(handle, fname, dentry, inode, &iloc, | 1265 | ret = ext4_add_dirent_to_inline(handle, fname, dir, inode, &iloc, |
1268 | inline_start, inline_size); | 1266 | inline_start, inline_size); |
1269 | if (ret != -ENOSPC) | 1267 | if (ret != -ENOSPC) |
1270 | goto out; | 1268 | goto out; |
@@ -1285,7 +1283,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, | |||
1285 | if (inline_size) { | 1283 | if (inline_size) { |
1286 | inline_start = ext4_get_inline_xattr_pos(dir, &iloc); | 1284 | inline_start = ext4_get_inline_xattr_pos(dir, &iloc); |
1287 | 1285 | ||
1288 | ret = ext4_add_dirent_to_inline(handle, fname, dentry, | 1286 | ret = ext4_add_dirent_to_inline(handle, fname, dir, |
1289 | inode, &iloc, inline_start, | 1287 | inode, &iloc, inline_start, |
1290 | inline_size); | 1288 | inline_size); |
1291 | 1289 | ||