From cf85ec88701610f0de2e959ac447d9613462fbc7 Mon Sep 17 00:00:00 2001 From: Vasily Averin Date: Sat, 9 Jun 2018 16:18:16 +0300 Subject: removed extra extern file_fdatawait_range Jeff added this extern twice in commit a823e4589e68 Fixes: a823e4589e68 ("mm: add file_fdatawait_range and file_write_and_wait") Signed-off-by: Vasily Averin Signed-off-by: Al Viro --- include/linux/fs.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 5c91108846db..f140c11d35dd 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2623,8 +2623,6 @@ static inline int filemap_fdatawait(struct address_space *mapping) extern bool filemap_range_has_page(struct address_space *, loff_t lstart, loff_t lend); -extern int __must_check file_fdatawait_range(struct file *file, loff_t lstart, - loff_t lend); extern int filemap_write_and_wait(struct address_space *mapping); extern int filemap_write_and_wait_range(struct address_space *mapping, loff_t lstart, loff_t lend); -- cgit v1.2.3 From 63a67a926e214dac94e29147c0f3d11499f655a1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jun 2018 17:16:44 -0400 Subject: kill dentry_update_name_case() the last user is gone Spotted-by: Richard Weinberger Signed-off-by: Al Viro --- fs/dcache.c | 27 --------------------------- include/linux/dcache.h | 2 -- 2 files changed, 29 deletions(-) (limited to 'include/linux') diff --git a/fs/dcache.c b/fs/dcache.c index 0e8e5de3c48a..d9323af88ed0 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2676,33 +2676,6 @@ struct dentry *d_exact_alias(struct dentry *entry, struct inode *inode) } EXPORT_SYMBOL(d_exact_alias); -/** - * dentry_update_name_case - update case insensitive dentry with a new name - * @dentry: dentry to be updated - * @name: new name - * - * Update a case insensitive dentry with new case of name. - * - * dentry must have been returned by d_lookup with name @name. Old and new - * name lengths must match (ie. no d_compare which allows mismatched name - * lengths). - * - * Parent inode i_mutex must be held over d_lookup and into this call (to - * keep renames and concurrent inserts, and readdir(2) away). - */ -void dentry_update_name_case(struct dentry *dentry, const struct qstr *name) -{ - BUG_ON(!inode_is_locked(dentry->d_parent->d_inode)); - BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */ - - spin_lock(&dentry->d_lock); - write_seqcount_begin(&dentry->d_seq); - memcpy((unsigned char *)dentry->d_name.name, name->name, name->len); - write_seqcount_end(&dentry->d_seq); - spin_unlock(&dentry->d_lock); -} -EXPORT_SYMBOL(dentry_update_name_case); - static void swap_names(struct dentry *dentry, struct dentry *target) { if (unlikely(dname_external(target))) { diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 66c6e17e61e5..cee70bf207fc 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -271,8 +271,6 @@ extern void d_rehash(struct dentry *); extern void d_add(struct dentry *, struct inode *); -extern void dentry_update_name_case(struct dentry *, const struct qstr *); - /* used for rename() and baskets */ extern void d_move(struct dentry *, struct dentry *); extern void d_exchange(struct dentry *, struct dentry *); -- cgit v1.2.3 From 69448867abcb231afaa7891ff9d9fd04b2b94a0d Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Thu, 5 Jul 2018 09:25:43 +0300 Subject: fs: shave 8 bytes off of struct inode Here is a link to Linus' reply to Jan's concern about making i_blkbibts byte addressable: https://marc.info/?l=linux-fsdevel&m=152882624707975&w=2 Here is a link to an lkp.org report about potential performance improvement in some workload, which could(?) be related to packing i_blkbits closer to i_bytes/i_lock: https://marc.info/?l=linux-fsdevel&m=153077048108198&w=2 Changes since v1: - Add links to relevant discussions Signed-off-by: Amir Goldstein Signed-off-by: Al Viro --- include/linux/fs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index f140c11d35dd..9b00676f5d9d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -275,6 +275,7 @@ struct writeback_control; /* * Write life time hint values. + * Stored in struct inode as u8. */ enum rw_hint { WRITE_LIFE_NOT_SET = 0, @@ -609,8 +610,8 @@ struct inode { struct timespec64 i_ctime; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; - unsigned int i_blkbits; - enum rw_hint i_write_hint; + u8 i_blkbits; + u8 i_write_hint; blkcnt_t i_blocks; #ifdef __NEED_I_SIZE_ORDERED -- cgit v1.2.3