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 161345 Details for
Bug 249394
CIFS deadlocks in cifs_get_inode_info_unix
[?]
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 -- Amit's patch ported to 5.1 beta kernels
linux-2.6.18-cifs-get-inode-info-deadlock.patch (text/plain), 1.81 KB, created by
Jeff Layton
on 2007-08-15 11:38:26 UTC
(
hide
)
Description:
patch -- Amit's patch ported to 5.1 beta kernels
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-08-15 11:38:26 UTC
Size:
1.81 KB
patch
obsolete
>commit df0fc3ba38af51bbb45f1d6b4ef32a736ba6e307 >Author: Jeff Layton <jlayton@redhat.com> >Date: Wed Aug 15 06:51:00 2007 -0400 > > BZ#249394: [CIFS] fix deadlock in cifs_get_inode_info_unix > >diff --git a/fs/cifs/file.c b/fs/cifs/file.c >index 26e5453..603cf48 100644 >--- a/fs/cifs/file.c >+++ b/fs/cifs/file.c >@@ -2047,6 +2047,25 @@ static int cifs_readpage(struct file *file, struct page *page) > return rc; > } > >+static int is_inode_writable(struct cifsInodeInfo *cifs_inode) >+{ >+ struct cifsFileInfo *open_file; >+ >+ read_lock(&GlobalSMBSeslock); >+ list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { >+ if (open_file->closePend) >+ continue; >+ if (open_file->pfile && >+ ((open_file->pfile->f_flags & O_RDWR) || >+ (open_file->pfile->f_flags & O_WRONLY))) { >+ read_unlock(&GlobalSMBSeslock); >+ return 1; >+ } >+ } >+ read_unlock(&GlobalSMBSeslock); >+ return 0; >+} >+ > /* We do not want to update the file size from server for inodes > open for write - to avoid races with writepage extending > the file - in the future we could consider allowing >@@ -2055,18 +2074,12 @@ static int cifs_readpage(struct file *file, struct page *page) > page caching in the current Linux kernel design */ > int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) > { >- struct cifsFileInfo *open_file = NULL; >- >- if (cifsInode) >- open_file = find_writable_file(cifsInode); >- >- if(open_file) { >+ if (!cifsInode) >+ return 1; >+ if (is_inode_writable(cifsInode)) { >+ /* This inode is open for write at least once */ > struct cifs_sb_info *cifs_sb; > >- /* there is not actually a write pending so let >- this handle go free and allow it to >- be closable if needed */ >- atomic_dec(&open_file->wrtPending); > #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) > cifs_sb = CIFS_SB(cifsInode->vfs_inode.i_sb); > #else
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 249394
:
159920
| 161345