linux-brain/fs/orangefs
Martin Brandenburg 88f36d1b4f orangefs: set i_size on new symlink
commit f6a4b4c9d0 upstream.

As long as a symlink inode remains in-core, the destination (and
therefore size) will not be re-fetched from the server, as it cannot
change.  The original implementation of the attribute cache assumed that
setting the expiry time in the past was sufficient to cause a re-fetch
of all attributes on the next getattr.  That does not work in this case.

The bug manifested itself as follows.  When the command sequence

touch foo; ln -s foo bar; ls -l bar

is run, the output was

lrwxrwxrwx. 1 fedora fedora 4906 Apr 24 19:10 bar -> foo

However, after a re-mount, ls -l bar produces

lrwxrwxrwx. 1 fedora fedora    3 Apr 24 19:10 bar -> foo

After this commit, even before a re-mount, the output is

lrwxrwxrwx. 1 fedora fedora    3 Apr 24 19:10 bar -> foo

Reported-by: Becky Ligon <ligon@clemson.edu>
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Fixes: 71680c18c8 ("orangefs: Cache getattr results.")
Cc: stable@vger.kernel.org
Cc: hubcap@omnibond.com
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26 08:08:08 +08:00
..
Kconfig Orangefs: kernel client part 7 2015-10-03 11:40:00 -04:00
Makefile Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
acl.c orangefs: Don't clear SGID when inheriting ACLs 2017-09-27 14:39:18 +02:00
dcache.c orangefs: don't use d_time 2016-10-24 14:50:07 -04:00
devorangefs-req.c orangefs: initialize op on loop restart in orangefs_devreq_read 2018-01-31 12:55:50 +01:00
dir.c orangefs: use %pd/%pD 2016-08-07 23:38:47 -04:00
downcall.h orangefs: add features op 2016-08-12 15:12:54 -04:00
file.c orangefs: fix deadlock; do not write i_size in read_iter 2018-01-31 12:55:53 +01:00
inode.c orangefs: do not check possibly stale size on truncate 2017-05-20 14:28:39 +02:00
namei.c orangefs: set i_size on new symlink 2018-06-26 08:08:08 +08:00
orangefs-bufmap.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
orangefs-bufmap.h orangefs-bufmap.h: trim unused junk 2016-03-25 22:30:54 -04:00
orangefs-cache.c orangefs: add features op 2016-08-12 15:12:54 -04:00
orangefs-debug.h Orangef: remove overlooked old-style userspace debug parts 2015-12-11 11:00:12 -05:00
orangefs-debugfs.c orangefs: Dan Carpenter influenced cleanups... 2017-04-18 07:11:46 +02:00
orangefs-debugfs.h orangefs: clean up debugfs globals 2016-08-15 11:38:36 -04:00
orangefs-dev-proto.h orangefs: fix buffer size mis-match between kernel space and user space. 2017-04-18 07:11:47 +02:00
orangefs-kernel.h orangefs: fix deadlock; do not write i_size in read_iter 2018-01-31 12:55:53 +01:00
orangefs-mod.c orangefs: clean up debugfs 2016-11-07 10:41:55 -05:00
orangefs-sysfs.c Merge branch 'misc' into for-next 2016-09-28 14:50:46 -04:00
orangefs-sysfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-utils.c fs: add i_blocksize() 2017-06-14 15:06:00 +02:00
protocol.h orangefs: clean up debugfs globals 2016-08-15 11:38:36 -04:00
super.c orangefs_kill_sb(): deal with allocation failures 2018-04-24 09:34:17 +02:00
symlink.c vfs: Remove {get,set,remove}xattr inode operations 2016-10-07 21:48:36 -04:00
upcall.h orangefs: add features op 2016-08-12 15:12:54 -04:00
waitqueue.c orangefs: do not wait for timeout if umounting 2018-03-24 11:00:16 +01:00
xattr.c orangefs: clean up oversize xattr validation 2017-05-20 14:28:39 +02:00