diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:33:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-26 20:33:59 -0400 |
commit | 59953fba87e5e535657403cc6439d24187929559 (patch) | |
tree | 4f92cc3bcacf052cb3fb895512af5a7d3dad86cb /fs/nfs/dir.c | |
parent | 9ec3a646fe09970f801ab15e0f1694060b9f19af (diff) | |
parent | f139b6c676c7e49b66016b28bf3f8ec5c54be891 (diff) |
Merge tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Another set of mainly bugfixes and a couple of cleanups. No new
functionality in this round.
Highlights include:
Stable patches:
- Fix a regression in /proc/self/mountstats
- Fix the pNFS flexfiles O_DIRECT support
- Fix high load average due to callback thread sleeping
Bugfixes:
- Various patches to fix the pNFS layoutcommit support
- Do not cache pNFS deviceids unless server notifications are enabled
- Fix a SUNRPC transport reconnection regression
- make debugfs file creation failure non-fatal in SUNRPC
- Another fix for circular directory warnings on NFSv4 "junctioned"
mountpoints
- Fix locking around NFSv4.2 fallocate() support
- Truncating NFSv4 file opens should also sync O_DIRECT writes
- Prevent infinite loop in rpcrdma_ep_create()
Features:
- Various improvements to the RDMA transport code's handling of
memory registration
- Various code cleanups"
* tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (55 commits)
fs/nfs: fix new compiler warning about boolean in switch
nfs: Remove unneeded casts in nfs
NFS: Don't attempt to decode missing directory entries
Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
NFS: Rename idmap.c to nfs4idmap.c
NFS: Move nfs_idmap.h into fs/nfs/
NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h
NFS: Add a stub for GETDEVICELIST
nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
nfs: fix DIO good bytes calculation
nfs: Fetch MOUNTED_ON_FILEID when updating an inode
sunrpc: make debugfs file creation failure non-fatal
nfs: fix high load average due to callback thread sleeping
NFS: Reduce time spent holding the i_mutex during fallocate()
NFS: Don't zap caches on fallocate()
xprtrdma: Make rpcrdma_{un}map_one() into inline functions
xprtrdma: Handle non-SEND completions via a callout
xprtrdma: Add "open" memreg op
xprtrdma: Add "destroy MRs" memreg op
xprtrdma: Add "reset MRs" memreg op
...
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 1e51ecd61854..b2c8b31b2be7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -543,6 +543,9 @@ int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *en | |||
543 | if (scratch == NULL) | 543 | if (scratch == NULL) |
544 | return -ENOMEM; | 544 | return -ENOMEM; |
545 | 545 | ||
546 | if (buflen == 0) | ||
547 | goto out_nopages; | ||
548 | |||
546 | xdr_init_decode_pages(&stream, &buf, xdr_pages, buflen); | 549 | xdr_init_decode_pages(&stream, &buf, xdr_pages, buflen); |
547 | xdr_set_scratch_buffer(&stream, page_address(scratch), PAGE_SIZE); | 550 | xdr_set_scratch_buffer(&stream, page_address(scratch), PAGE_SIZE); |
548 | 551 | ||
@@ -564,6 +567,7 @@ int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *en | |||
564 | break; | 567 | break; |
565 | } while (!entry->eof); | 568 | } while (!entry->eof); |
566 | 569 | ||
570 | out_nopages: | ||
567 | if (count == 0 || (status == -EBADCOOKIE && entry->eof != 0)) { | 571 | if (count == 0 || (status == -EBADCOOKIE && entry->eof != 0)) { |
568 | array = nfs_readdir_get_array(page); | 572 | array = nfs_readdir_get_array(page); |
569 | if (!IS_ERR(array)) { | 573 | if (!IS_ERR(array)) { |