summaryrefslogtreecommitdiff
path: root/fs/orangefs/namei.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-07 19:23:12 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-07 19:23:12 +0300
commit091a0f278510696f3f573618cc7381c6f35659cb (patch)
tree553dd9152797a46afc14d2bc1ca633b6c653f9e9 /fs/orangefs/namei.c
parent70f2ae1f002b0ed4b4382210df8e4b6e54079012 (diff)
parentb1116bc03c00255b7e5feaed561e8bb2fc38c0f8 (diff)
downloadlinux-091a0f278510696f3f573618cc7381c6f35659cb.tar.xz
Merge tag 'for-linus-4.18-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull orangefs updates from Mike Marshall: "Fixes and cleanups: - fix some sparse warnings - cleanup some code formatting - fix up some attribute/meta-data related code" * tag 'for-linus-4.18-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: use sparse annotations for holding locks across function calls. orangefs: make debug_help_fops static orangefs: remove unused function orangefs_get_bufmap_init orangefs: specify user pointers when using dev_map_desc and bufmap orangefs: formatting cleanups orangefs: set i_size on new symlink orangefs: report attributes_mask and attributes for statx orangefs: make struct orangefs_file_vm_ops static orangefs: revamp block sizes
Diffstat (limited to 'fs/orangefs/namei.c')
-rw-r--r--fs/orangefs/namei.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index 365cd73d9109..625b0580f9be 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -278,6 +278,13 @@ static int orangefs_symlink(struct inode *dir,
ret = PTR_ERR(inode);
goto out;
}
+ /*
+ * This is necessary because orangefs_inode_getattr will not
+ * re-read symlink size as it is impossible for it to change.
+ * Invalidating the cache does not help. orangefs_new_inode
+ * does not set the correct size (it does not know symname).
+ */
+ inode->i_size = strlen(symname);
gossip_debug(GOSSIP_NAME_DEBUG,
"Assigned symlink inode new number of %pU\n",