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 193221 Details for
Bug 272021
GFS2 - flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118!
[?]
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]
Initial patch
bz272021-git.patch (text/plain), 2.74 KB, created by
Abhijith Das
on 2007-09-12 05:06:29 UTC
(
hide
)
Description:
Initial patch
Filename:
MIME Type:
Creator:
Abhijith Das
Created:
2007-09-12 05:06:29 UTC
Size:
2.74 KB
patch
obsolete
>diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c >index 931368a..462bceb 100644 >--- a/fs/gfs2/glock.c >+++ b/fs/gfs2/glock.c >@@ -1133,6 +1133,52 @@ static void add_to_queue(struct gfs2_hol > } > > /** >+ * gfs2_flock_glock_nq - same as gfs2_glock_nq, except that it applies to >+ * flocks. Doesn't perform the owner checks in add_to_queue() because a >+ * process can hold multiple flocks on multiple file descriptors >+ * >+ * @gh: the holder structure >+ * >+ * Returns: errno >+ */ >+ >+int gfs2_flock_glock_nq(struct gfs2_holder *gh) >+{ >+ struct gfs2_glock *gl = gh->gh_gl; >+ struct gfs2_sbd *sdp = gl->gl_sbd; >+ int error = 0; >+ >+restart: >+ if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) { >+ set_bit(HIF_ABORTED, &gh->gh_iflags); >+ return -EIO; >+ } >+ >+ set_bit(HIF_PROMOTE, &gh->gh_iflags); >+ spin_lock(&gl->gl_spin); >+ >+ if (test_and_set_bit(HIF_WAIT, &gh->gh_iflags)) >+ BUG(); >+ >+ if (gh->gh_flags & LM_FLAG_PRIORITY) >+ list_add(&gh->gh_list, &gl->gl_waiters3); >+ else >+ list_add_tail(&gh->gh_list, &gl->gl_waiters3); >+ >+ run_queue(gl); >+ spin_unlock(&gl->gl_spin); >+ if (!(gh->gh_flags & GL_ASYNC)) { >+ error = glock_wait_internal(gh); >+ if (error == GLR_CANCELED) { >+ msleep(100); >+ goto restart; >+ } >+ } >+ >+ return error; >+} >+ >+/** > * gfs2_glock_nq - enqueue a struct gfs2_holder onto a glock (acquire a glock) > * @gh: the holder structure > * >diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h >index f7a8e62..5f5418c 100644 >--- a/fs/gfs2/glock.h >+++ b/fs/gfs2/glock.h >@@ -84,6 +84,7 @@ void gfs2_holder_reinit(unsigned int sta > struct gfs2_holder *gh); > void gfs2_holder_uninit(struct gfs2_holder *gh); > int gfs2_glock_nq(struct gfs2_holder *gh); >+int gfs2_flock_glock_nq(struct gfs2_holder *gh); > int gfs2_glock_poll(struct gfs2_holder *gh); > int gfs2_glock_wait(struct gfs2_holder *gh); > void gfs2_glock_dq(struct gfs2_holder *gh); >diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c >index 94d76ac..b83cf32 100644 >--- a/fs/gfs2/ops_file.c >+++ b/fs/gfs2/ops_file.c >@@ -579,22 +579,24 @@ static int do_flock(struct file *file, i > if (gl) { > if (fl_gh->gh_state == state) > goto out; >- gfs2_glock_hold(gl); > flock_lock_file_wait(file, > &(struct file_lock){.fl_type = F_UNLCK}); >- gfs2_glock_dq_uninit(fl_gh); >+ gfs2_glock_dq_wait(fl_gh); >+ gfs2_holder_reinit(state, flags, fl_gh); >+ >+ error = gfs2_glock_nq(fl_gh); > } else { > error = gfs2_glock_get(GFS2_SB(&ip->i_inode), > ip->i_no_addr, &gfs2_flock_glops, > CREATE, &gl); > if (error) > goto out; >- } >+ gfs2_holder_init(gl, state, flags, fl_gh); >+ gfs2_glock_put(gl); > >- gfs2_holder_init(gl, state, flags, fl_gh); >- gfs2_glock_put(gl); >+ error = gfs2_glock_nq(fl_gh); >+ } > >- error = gfs2_glock_nq(fl_gh); > if (error) { > gfs2_holder_uninit(fl_gh); > if (error == GLR_TRYFAILED)
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 272021
:
183661
|
193221
|
194051