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 295614 Details for
Bug 432057
GFS2: d_doio stuck in readv() waiting for pagelock.
[?]
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 to fix bug for upstream kernels
readpage-bug.diff (text/plain), 4.24 KB, created by
Steve Whitehouse
on 2008-02-22 10:59:41 UTC
(
hide
)
Description:
Patch to fix bug for upstream kernels
Filename:
MIME Type:
Creator:
Steve Whitehouse
Created:
2008-02-22 10:59:41 UTC
Size:
4.24 KB
patch
obsolete
>diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h >index ace5770..cdad3e6 100644 >--- a/fs/gfs2/glock.h >+++ b/fs/gfs2/glock.h >@@ -32,24 +32,23 @@ > #define GLR_TRYFAILED 13 > #define GLR_CANCELED 14 > >-static inline int gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) >+static inline struct gfs2_holder *gfs2_glock_is_locked_by_me(struct gfs2_glock *gl) > { > struct gfs2_holder *gh; >- int locked = 0; > struct pid *pid; > > /* Look in glock's list of holders for one with current task as owner */ > spin_lock(&gl->gl_spin); > pid = task_pid(current); > list_for_each_entry(gh, &gl->gl_holders, gh_list) { >- if (gh->gh_owner_pid == pid) { >- locked = 1; >- break; >- } >+ if (gh->gh_owner_pid == pid) >+ goto out; > } >+ gh = NULL; >+out: > spin_unlock(&gl->gl_spin); > >- return locked; >+ return gh; > } > > static inline int gfs2_glock_is_held_excl(struct gfs2_glock *gl) >diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c >index 5f50dd5..810ff02 100644 >--- a/fs/gfs2/inode.c >+++ b/fs/gfs2/inode.c >@@ -493,7 +493,7 @@ struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, > return dir; > } > >- if (gfs2_glock_is_locked_by_me(dip->i_gl) == 0) { >+ if (gfs2_glock_is_locked_by_me(dip->i_gl) == NULL) { > error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh); > if (error) > return ERR_PTR(error); >diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c >index 7523999..fbb4a6a 100644 >--- a/fs/gfs2/ops_address.c >+++ b/fs/gfs2/ops_address.c >@@ -508,23 +508,26 @@ static int __gfs2_readpage(void *file, struct page *page) > static int gfs2_readpage(struct file *file, struct page *page) > { > struct gfs2_inode *ip = GFS2_I(page->mapping->host); >- struct gfs2_holder gh; >+ struct gfs2_holder *gh; > int error; > >- gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|LM_FLAG_TRY_1CB, &gh); >- error = gfs2_glock_nq_atime(&gh); >- if (unlikely(error)) { >+ gh = gfs2_glock_is_locked_by_me(ip->i_gl); >+ if (!gh) { >+ gh = kmalloc(sizeof(struct gfs2_holder), GFP_NOFS); >+ if (!gh) >+ return -ENOBUFS; >+ gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, gh); > unlock_page(page); >- goto out; >+ error = gfs2_glock_nq_atime(gh); >+ if (likely(error != 0)) >+ goto out; >+ return AOP_TRUNCATED_PAGE; > } > error = __gfs2_readpage(file, page); >- gfs2_glock_dq(&gh); >+ gfs2_glock_dq(gh); > out: >- gfs2_holder_uninit(&gh); >- if (error == GLR_TRYFAILED) { >- yield(); >- return AOP_TRUNCATED_PAGE; >- } >+ gfs2_holder_uninit(gh); >+ kfree(gh); > return error; > } > >@@ -826,7 +829,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping, > unsigned int to = from + len; > int ret; > >- BUG_ON(gfs2_glock_is_locked_by_me(ip->i_gl) == 0); >+ BUG_ON(gfs2_glock_is_locked_by_me(ip->i_gl) == NULL); > > ret = gfs2_meta_inode_buffer(ip, &dibh); > if (unlikely(ret)) { >diff --git a/fs/gfs2/ops_dentry.c b/fs/gfs2/ops_dentry.c >index 793e334..4a5e676 100644 >--- a/fs/gfs2/ops_dentry.c >+++ b/fs/gfs2/ops_dentry.c >@@ -43,7 +43,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) > struct gfs2_holder d_gh; > struct gfs2_inode *ip = NULL; > int error; >- int had_lock=0; >+ int had_lock = 0; > > if (inode) { > if (is_bad_inode(inode)) >@@ -54,7 +54,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) > if (sdp->sd_args.ar_localcaching) > goto valid; > >- had_lock = gfs2_glock_is_locked_by_me(dip->i_gl); >+ had_lock = (gfs2_glock_is_locked_by_me(dip->i_gl) != NULL); > if (!had_lock) { > error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh); > if (error) >diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c >index 301c945..af7097a 100644 >--- a/fs/gfs2/ops_inode.c >+++ b/fs/gfs2/ops_inode.c >@@ -898,7 +898,7 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd) > int error; > int unlock = 0; > >- if (gfs2_glock_is_locked_by_me(ip->i_gl) == 0) { >+ if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { > error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); > if (error) > return error; >@@ -1065,7 +1065,7 @@ static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, > int error; > int unlock = 0; > >- if (gfs2_glock_is_locked_by_me(ip->i_gl) == 0) { >+ if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { > error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); > if (error) > return error;
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 432057
:
294383
|
295614
|
296569
|
297894
|
298191
|
302891
|
303203
|
303208
|
303209
|
303500
|
303542
|
303631
|
303637
|
303646
|
304026
|
304098
|
304112
|
304161
|
304398
|
304409
|
304572
|
304636
|
304637
|
304749
|
304755
|
304811
|
304837
|
304876
|
304898
|
304946
|
304955
|
304976
|
304984
|
305126
|
305185
|
305237
|
305266
|
305377
|
305387
|
305404
|
305506
|
305513
|
305678
|
305702
|
305727
|
306084
|
306111
|
306191
|
306207
|
306208
|
306275
|
306287
|
306832
|
306972
|
307077
|
307096
|
307158