Commit 2a2d4b4
nfs: Fix ugly referral attributes
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: 6b97fd3 ("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>1 parent ab33df4 commit 2a2d4b4
1 file changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
| 245 | + | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | | - | |
252 | | - | |
253 | | - | |
| 250 | + | |
254 | 251 | | |
255 | 252 | | |
256 | 253 | | |
| |||
6351 | 6348 | | |
6352 | 6349 | | |
6353 | 6350 | | |
6354 | | - | |
6355 | | - | |
6356 | | - | |
| 6351 | + | |
6357 | 6352 | | |
6358 | 6353 | | |
6359 | 6354 | | |
| |||
6372 | 6367 | | |
6373 | 6368 | | |
6374 | 6369 | | |
| 6370 | + | |
| 6371 | + | |
| 6372 | + | |
6375 | 6373 | | |
6376 | 6374 | | |
6377 | 6375 | | |
6378 | | - | |
| 6376 | + | |
6379 | 6377 | | |
6380 | | - | |
| 6378 | + | |
6381 | 6379 | | |
6382 | 6380 | | |
6383 | 6381 | | |
| |||
0 commit comments