diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-05 03:12:21 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-05 03:12:21 -0400 |
commit | 4e29402fe4b2006c994eed5020c42b2cc87d9b42 (patch) | |
tree | c0229c107045ab21487729f6a6cab6b70ed30bfa /fs/nfs | |
parent | f8852b12200df393b0a4db1a7052454bbc335443 (diff) | |
parent | 00b317a41c5428b13eb7e5b4bbc691b1aa7afa80 (diff) |
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/namespace.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 3 | ||||
-rw-r--r-- | fs/nfs/pagelist.c | 4 | ||||
-rw-r--r-- | fs/nfs/write.c | 13 |
4 files changed, 10 insertions, 14 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index ad92bf731ff5..9166fcb66da2 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
@@ -192,13 +192,15 @@ static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct de | |||
192 | auth = rpcauth_create(flavor, clone); | 192 | auth = rpcauth_create(flavor, clone); |
193 | if (!auth) { | 193 | if (!auth) { |
194 | flavor = -EIO; | 194 | flavor = -EIO; |
195 | goto out; | 195 | goto out_shutdown; |
196 | } | 196 | } |
197 | err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, | 197 | err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, |
198 | &path->dentry->d_name, | 198 | &path->dentry->d_name, |
199 | fh, fattr); | 199 | fh, fattr); |
200 | if (err < 0) | 200 | if (err < 0) |
201 | flavor = err; | 201 | flavor = err; |
202 | out_shutdown: | ||
203 | rpc_shutdown_client(clone); | ||
202 | out: | 204 | out: |
203 | return flavor; | 205 | return flavor; |
204 | } | 206 | } |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index ab1bf5bb021f..a6804f704d9d 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -590,7 +590,8 @@ nfs4_get_open_state(struct inode *inode, struct nfs4_state_owner *owner) | |||
590 | state->owner = owner; | 590 | state->owner = owner; |
591 | atomic_inc(&owner->so_count); | 591 | atomic_inc(&owner->so_count); |
592 | list_add(&state->inode_states, &nfsi->open_states); | 592 | list_add(&state->inode_states, &nfsi->open_states); |
593 | state->inode = igrab(inode); | 593 | ihold(inode); |
594 | state->inode = inode; | ||
594 | spin_unlock(&inode->i_lock); | 595 | spin_unlock(&inode->i_lock); |
595 | /* Note: The reclaim code dictates that we add stateless | 596 | /* Note: The reclaim code dictates that we add stateless |
596 | * and read-only stateids to the end of the list */ | 597 | * and read-only stateids to the end of the list */ |
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 87a593c2b055..c80add6e2213 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -135,14 +135,14 @@ void nfs_clear_page_tag_locked(struct nfs_page *req) | |||
135 | nfs_unlock_request(req); | 135 | nfs_unlock_request(req); |
136 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /* |
139 | * nfs_clear_request - Free up all resources allocated to the request | 139 | * nfs_clear_request - Free up all resources allocated to the request |
140 | * @req: | 140 | * @req: |
141 | * | 141 | * |
142 | * Release page and open context resources associated with a read/write | 142 | * Release page and open context resources associated with a read/write |
143 | * request after it has completed. | 143 | * request after it has completed. |
144 | */ | 144 | */ |
145 | void nfs_clear_request(struct nfs_page *req) | 145 | static void nfs_clear_request(struct nfs_page *req) |
146 | { | 146 | { |
147 | struct page *page = req->wb_page; | 147 | struct page *page = req->wb_page; |
148 | struct nfs_open_context *ctx = req->wb_context; | 148 | struct nfs_open_context *ctx = req->wb_context; |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 85d75254328e..af0c6279a4a7 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -389,11 +389,8 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req) | |||
389 | spin_lock(&inode->i_lock); | 389 | spin_lock(&inode->i_lock); |
390 | error = radix_tree_insert(&nfsi->nfs_page_tree, req->wb_index, req); | 390 | error = radix_tree_insert(&nfsi->nfs_page_tree, req->wb_index, req); |
391 | BUG_ON(error); | 391 | BUG_ON(error); |
392 | if (!nfsi->npages) { | 392 | if (!nfsi->npages && nfs_have_delegation(inode, FMODE_WRITE)) |
393 | igrab(inode); | 393 | nfsi->change_attr++; |
394 | if (nfs_have_delegation(inode, FMODE_WRITE)) | ||
395 | nfsi->change_attr++; | ||
396 | } | ||
397 | set_bit(PG_MAPPED, &req->wb_flags); | 394 | set_bit(PG_MAPPED, &req->wb_flags); |
398 | SetPagePrivate(req->wb_page); | 395 | SetPagePrivate(req->wb_page); |
399 | set_page_private(req->wb_page, (unsigned long)req); | 396 | set_page_private(req->wb_page, (unsigned long)req); |
@@ -423,11 +420,7 @@ static void nfs_inode_remove_request(struct nfs_page *req) | |||
423 | clear_bit(PG_MAPPED, &req->wb_flags); | 420 | clear_bit(PG_MAPPED, &req->wb_flags); |
424 | radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index); | 421 | radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index); |
425 | nfsi->npages--; | 422 | nfsi->npages--; |
426 | if (!nfsi->npages) { | 423 | spin_unlock(&inode->i_lock); |
427 | spin_unlock(&inode->i_lock); | ||
428 | iput(inode); | ||
429 | } else | ||
430 | spin_unlock(&inode->i_lock); | ||
431 | nfs_release_request(req); | 424 | nfs_release_request(req); |
432 | } | 425 | } |
433 | 426 | ||