]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nfs: Fix ugly referral attributes
authorChuck Lever <chuck.lever@oracle.com>
Sun, 5 Nov 2017 20:45:22 +0000 (15:45 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 13 Mar 2018 10:25:43 +0000 (11:25 +0100)
commit40b3da351bc50111d53f6a5954025efa52ae7dcd
treec1472f744d7b8778c14796fe9a3a7ef7e4a73c7c
parent31d3b108d55a32a0fc121246133b085eb618e69a
nfs: Fix ugly referral attributes

BugLink: http://bugs.launchpad.net/bugs/1744873
commit c05cefcc72416a37eba5a2b35f0704ed758a9145 upstream.

Before traversing a referral and performing a mount, the mounted-on
directory looks strange:

dr-xr-xr-x. 2 4294967294 4294967294 0 Dec 31  1969 dir.0

nfs4_get_referral is wiping out any cached attributes with what was
returned via GETATTR(fs_locations), but the bit mask for that
operation does not request any file attributes.

Retrieve owner and timestamp information so that the memcpy in
nfs4_get_referral fills in more attributes.

Changes since v1:
- Don't request attributes that the client unconditionally replaces
- Request only MOUNTED_ON_FILEID or FILEID attribute, not both
- encode_fs_locations() doesn't use the third bitmask word

Fixes: 6b97fd3da1ea ("NFSv4: Follow a referral")
Suggested-by: Pradeep Thomas <pradeepthomas@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/nfs/nfs4proc.c