Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Fix the mapping of the NFSERR_SERVERFAULT error
NFS: Remove a redundant check for PageFsCache in nfs_migrate_page()
NFS: Fix a bug in nfs_fscache_release_page()

+10 -12
+4 -5
fs/nfs/fscache.c
··· 354 354 */ 355 355 int nfs_fscache_release_page(struct page *page, gfp_t gfp) 356 356 { 357 - struct nfs_inode *nfsi = NFS_I(page->mapping->host); 358 - struct fscache_cookie *cookie = nfsi->fscache; 359 - 360 - BUG_ON(!cookie); 361 - 362 357 if (PageFsCache(page)) { 358 + struct nfs_inode *nfsi = NFS_I(page->mapping->host); 359 + struct fscache_cookie *cookie = nfsi->fscache; 360 + 361 + BUG_ON(!cookie); 363 362 dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", 364 363 cookie, page, nfsi); 365 364
+1 -1
fs/nfs/mount_clnt.c
··· 120 120 { .status = MNT3ERR_INVAL, .errno = -EINVAL, }, 121 121 { .status = MNT3ERR_NAMETOOLONG, .errno = -ENAMETOOLONG, }, 122 122 { .status = MNT3ERR_NOTSUPP, .errno = -ENOTSUPP, }, 123 - { .status = MNT3ERR_SERVERFAULT, .errno = -ESERVERFAULT, }, 123 + { .status = MNT3ERR_SERVERFAULT, .errno = -EREMOTEIO, }, 124 124 }; 125 125 126 126 struct mountres {
+1 -1
fs/nfs/nfs2xdr.c
··· 699 699 { NFSERR_BAD_COOKIE, -EBADCOOKIE }, 700 700 { NFSERR_NOTSUPP, -ENOTSUPP }, 701 701 { NFSERR_TOOSMALL, -ETOOSMALL }, 702 - { NFSERR_SERVERFAULT, -ESERVERFAULT }, 702 + { NFSERR_SERVERFAULT, -EREMOTEIO }, 703 703 { NFSERR_BADTYPE, -EBADTYPE }, 704 704 { NFSERR_JUKEBOX, -EJUKEBOX }, 705 705 { -1, -EIO }
+3 -3
fs/nfs/nfs4xdr.c
··· 4631 4631 * If the server returns different values for sessionID, slotID or 4632 4632 * sequence number, the server is looney tunes. 4633 4633 */ 4634 - status = -ESERVERFAULT; 4634 + status = -EREMOTEIO; 4635 4635 4636 4636 if (memcmp(id.data, res->sr_session->sess_id.data, 4637 4637 NFS4_MAX_SESSIONID_LEN)) { ··· 5774 5774 { NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, 5775 5775 { NFS4ERR_NOTSUPP, -ENOTSUPP }, 5776 5776 { NFS4ERR_TOOSMALL, -ETOOSMALL }, 5777 - { NFS4ERR_SERVERFAULT, -ESERVERFAULT }, 5777 + { NFS4ERR_SERVERFAULT, -EREMOTEIO }, 5778 5778 { NFS4ERR_BADTYPE, -EBADTYPE }, 5779 5779 { NFS4ERR_LOCKED, -EAGAIN }, 5780 5780 { NFS4ERR_SYMLINK, -ELOOP }, ··· 5801 5801 } 5802 5802 if (stat <= 10000 || stat > 10100) { 5803 5803 /* The server is looney tunes. */ 5804 - return -ESERVERFAULT; 5804 + return -EREMOTEIO; 5805 5805 } 5806 5806 /* If we cannot translate the error, the recovery routines should 5807 5807 * handle it.
+1 -2
fs/nfs/write.c
··· 1598 1598 struct nfs_page *req; 1599 1599 int ret; 1600 1600 1601 - if (PageFsCache(page)) 1602 - nfs_fscache_release_page(page, GFP_KERNEL); 1601 + nfs_fscache_release_page(page, GFP_KERNEL); 1603 1602 1604 1603 req = nfs_find_and_lock_request(page); 1605 1604 ret = PTR_ERR(req);