Commit efa82bab authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 06a57f4f fdcb4577
...@@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode) ...@@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode)
*/ */
int nfs_fscache_release_page(struct page *page, gfp_t gfp) int nfs_fscache_release_page(struct page *page, gfp_t gfp)
{ {
if (PageFsCache(page)) {
struct nfs_inode *nfsi = NFS_I(page->mapping->host); struct nfs_inode *nfsi = NFS_I(page->mapping->host);
struct fscache_cookie *cookie = nfsi->fscache; struct fscache_cookie *cookie = nfsi->fscache;
BUG_ON(!cookie); BUG_ON(!cookie);
if (PageFsCache(page)) {
dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
cookie, page, nfsi); cookie, page, nfsi);
......
...@@ -120,7 +120,7 @@ static struct { ...@@ -120,7 +120,7 @@ static struct {
{ .status = MNT3ERR_INVAL, .errno = -EINVAL, }, { .status = MNT3ERR_INVAL, .errno = -EINVAL, },
{ .status = MNT3ERR_NAMETOOLONG, .errno = -ENAMETOOLONG, }, { .status = MNT3ERR_NAMETOOLONG, .errno = -ENAMETOOLONG, },
{ .status = MNT3ERR_NOTSUPP, .errno = -ENOTSUPP, }, { .status = MNT3ERR_NOTSUPP, .errno = -ENOTSUPP, },
{ .status = MNT3ERR_SERVERFAULT, .errno = -ESERVERFAULT, }, { .status = MNT3ERR_SERVERFAULT, .errno = -EREMOTEIO, },
}; };
struct mountres { struct mountres {
......
...@@ -699,7 +699,7 @@ static struct { ...@@ -699,7 +699,7 @@ static struct {
{ NFSERR_BAD_COOKIE, -EBADCOOKIE }, { NFSERR_BAD_COOKIE, -EBADCOOKIE },
{ NFSERR_NOTSUPP, -ENOTSUPP }, { NFSERR_NOTSUPP, -ENOTSUPP },
{ NFSERR_TOOSMALL, -ETOOSMALL }, { NFSERR_TOOSMALL, -ETOOSMALL },
{ NFSERR_SERVERFAULT, -ESERVERFAULT }, { NFSERR_SERVERFAULT, -EREMOTEIO },
{ NFSERR_BADTYPE, -EBADTYPE }, { NFSERR_BADTYPE, -EBADTYPE },
{ NFSERR_JUKEBOX, -EJUKEBOX }, { NFSERR_JUKEBOX, -EJUKEBOX },
{ -1, -EIO } { -1, -EIO }
......
...@@ -4631,7 +4631,7 @@ static int decode_sequence(struct xdr_stream *xdr, ...@@ -4631,7 +4631,7 @@ static int decode_sequence(struct xdr_stream *xdr,
* If the server returns different values for sessionID, slotID or * If the server returns different values for sessionID, slotID or
* sequence number, the server is looney tunes. * sequence number, the server is looney tunes.
*/ */
status = -ESERVERFAULT; status = -EREMOTEIO;
if (memcmp(id.data, res->sr_session->sess_id.data, if (memcmp(id.data, res->sr_session->sess_id.data,
NFS4_MAX_SESSIONID_LEN)) { NFS4_MAX_SESSIONID_LEN)) {
...@@ -5774,7 +5774,7 @@ static struct { ...@@ -5774,7 +5774,7 @@ static struct {
{ NFS4ERR_BAD_COOKIE, -EBADCOOKIE }, { NFS4ERR_BAD_COOKIE, -EBADCOOKIE },
{ NFS4ERR_NOTSUPP, -ENOTSUPP }, { NFS4ERR_NOTSUPP, -ENOTSUPP },
{ NFS4ERR_TOOSMALL, -ETOOSMALL }, { NFS4ERR_TOOSMALL, -ETOOSMALL },
{ NFS4ERR_SERVERFAULT, -ESERVERFAULT }, { NFS4ERR_SERVERFAULT, -EREMOTEIO },
{ NFS4ERR_BADTYPE, -EBADTYPE }, { NFS4ERR_BADTYPE, -EBADTYPE },
{ NFS4ERR_LOCKED, -EAGAIN }, { NFS4ERR_LOCKED, -EAGAIN },
{ NFS4ERR_SYMLINK, -ELOOP }, { NFS4ERR_SYMLINK, -ELOOP },
...@@ -5801,7 +5801,7 @@ nfs4_stat_to_errno(int stat) ...@@ -5801,7 +5801,7 @@ nfs4_stat_to_errno(int stat)
} }
if (stat <= 10000 || stat > 10100) { if (stat <= 10000 || stat > 10100) {
/* The server is looney tunes. */ /* The server is looney tunes. */
return -ESERVERFAULT; return -EREMOTEIO;
} }
/* If we cannot translate the error, the recovery routines should /* If we cannot translate the error, the recovery routines should
* handle it. * handle it.
......
...@@ -1598,7 +1598,6 @@ int nfs_migrate_page(struct address_space *mapping, struct page *newpage, ...@@ -1598,7 +1598,6 @@ int nfs_migrate_page(struct address_space *mapping, struct page *newpage,
struct nfs_page *req; struct nfs_page *req;
int ret; int ret;
if (PageFsCache(page))
nfs_fscache_release_page(page, GFP_KERNEL); nfs_fscache_release_page(page, GFP_KERNEL);
req = nfs_find_and_lock_request(page); req = nfs_find_and_lock_request(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment