Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 151296 Details for
Bug 234587
VFS: Busy inodes at umount on NFSv4 filesystem
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- if setattr call errors out, attempt to clean up incomplete open
linux-2.6.9-incomplete-open-setattr-error.patch (text/plain), 2.79 KB, created by
Jeff Layton
on 2007-03-30 17:30:42 UTC
(
hide
)
Description:
patch -- if setattr call errors out, attempt to clean up incomplete open
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-03-30 17:30:42 UTC
Size:
2.79 KB
patch
obsolete
>diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >index 9c0853e..9a5e654 100644 >--- a/fs/nfs/nfs4proc.c >+++ b/fs/nfs/nfs4proc.c >@@ -590,6 +590,7 @@ static void nfs4_do_open_work(void *vwarg) > goto out; > > status = 0; >+ state->inc_open_state = warg->flags; > memcpy(&state->stateid, &o_res.stateid, sizeof(state->stateid)); > spin_lock(&inode->i_lock); > if (warg->flags & FMODE_READ) >@@ -1104,12 +1105,17 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, > struct nfs4_state *state = NULL; > int need_iput = 0; > int status; >+ struct rpc_cred *cred = rpcauth_lookupcred(NFS_SERVER(inode)->client->cl_auth, 0); > > nfs_fattr_init(fattr); >- >+ >+ /* >+ * we need to know the state in case the RPC call returns error, but >+ * we only care about write states since they're the only ones that >+ * should end up here on an open. >+ */ >+ state = nfs4_find_state(inode, cred, FMODE_WRITE); > if (size_change) { >- struct rpc_cred *cred = rpcauth_lookupcred(NFS_SERVER(inode)->client->cl_auth, 0); >- state = nfs4_find_state(inode, cred, FMODE_WRITE); > if (state == NULL) { > state = nfs4_open_delegated(dentry->d_inode, > FMODE_WRITE, cred); >@@ -1119,9 +1125,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, > NULL, cred); > need_iput = 1; > } >- put_rpccred(cred); >- if (IS_ERR(state)) >+ if (IS_ERR(state)) { >+ put_rpccred(cred); > return PTR_ERR(state); >+ } > > if (state->inode != inode) { > printk(KERN_WARNING "nfs: raced in setattr (%p != %p), returning -EIO\n", inode, state->inode); >@@ -1133,7 +1140,15 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, > NFS_FH(inode), sattr, state); > if (status == 0) > nfs_setattr_update_inode(inode, sattr); >+ else if (!need_iput && state && state->inc_open_state) >+ /* >+ * something happened that may prevent the open from >+ * being completed. Do an extra close to prevent >+ * a reference leak >+ */ >+ nfs4_close_state(state, state->inc_open_state); > out: >+ put_rpccred(cred); > if (state) { > inode = state->inode; > nfs4_close_state(state, FMODE_WRITE); >diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c >index 12a6300..229b0e4 100644 >--- a/fs/nfs/nfs4state.c >+++ b/fs/nfs/nfs4state.c >@@ -530,7 +530,8 @@ static void nfs4_close_state_work(void *vwarg) > struct inode *inode = state->inode; > mode_t mode = warg->mode; > int newstate; >- >+ >+ state->inc_open_state = 0; > /* Protect against nfs4_find_state() */ > spin_lock(&inode->i_lock); > if (mode & FMODE_READ) >diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h >index 0b25876..88d442b 100644 >--- a/include/linux/nfs_fs.h >+++ b/include/linux/nfs_fs.h >@@ -781,6 +781,7 @@ struct nfs4_state { > unsigned int nreaders; > unsigned int nwriters; > int state; /* State on the server (R,W, or RW) */ >+ int inc_open_state; > atomic_t count; > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234587
:
151296
|
151557
|
151576
|
152181
|
152182