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 647705 Details for
Bug 833535
autofs-5.0.6-19.fc17.x86_64 doesn't work with mock
[?]
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 - use simple_empty() for empty directory check
autofs4-use-simple_empty-for-empty-directory-check.patch (text/plain), 2.63 KB, created by
Ian Kent
on 2012-11-19 11:24:03 UTC
(
hide
)
Description:
Patch - use simple_empty() for empty directory check
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2012-11-19 11:24:03 UTC
Size:
2.63 KB
patch
obsolete
>autofs4 - use simple_empty() for empty directory check > >From: Ian Kent <raven@themaw.net> > >For direct (and offset) mounts, if an automounted mount is manually >umounted the trigger mount dentry can appear non-empty causing it to >not trigger mounts. This can also happen if there is a file handle >leak in a user space automounting application. > >It happens because, when the ioctl control file handle is opened >on the mount, a cursor dentry is created which causes list_empty() >to see the dentry as non-empty. Since there is a case where listing >the directory of these dentrys is needed, the use of dcache_dir_*() >functions for .open() and .release() is needed. > >Consequently simple_empty() must be used instead of list_empty() >when checking for an empty directory. > >Signed-off-by: Ian Kent <raven@themaw.net> >--- > > fs/autofs4/root.c | 22 +++++----------------- > 1 files changed, 5 insertions(+), 17 deletions(-) > > >diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c >index 2e19f24..837dfb4 100644 >--- a/fs/autofs4/root.c >+++ b/fs/autofs4/root.c >@@ -124,13 +124,10 @@ static int autofs4_dir_open(struct inode *inode, struct file *file) > * it. > */ > spin_lock(&sbi->lookup_lock); >- spin_lock(&dentry->d_lock); >- if (!d_mountpoint(dentry) && list_empty(&dentry->d_subdirs)) { >- spin_unlock(&dentry->d_lock); >+ if (!d_mountpoint(dentry) && simple_empty(dentry)) { > spin_unlock(&sbi->lookup_lock); > return -ENOENT; > } >- spin_unlock(&dentry->d_lock); > spin_unlock(&sbi->lookup_lock); > > out: >@@ -386,12 +383,8 @@ static struct vfsmount *autofs4_d_automount(struct path *path) > goto done; > } > } else { >- spin_lock(&dentry->d_lock); >- if (!list_empty(&dentry->d_subdirs)) { >- spin_unlock(&dentry->d_lock); >+ if (!simple_empty(dentry)) > goto done; >- } >- spin_unlock(&dentry->d_lock); > } > ino->flags |= AUTOFS_INF_PENDING; > spin_unlock(&sbi->fs_lock); >@@ -605,9 +598,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry) > > spin_lock(&sbi->lookup_lock); > __autofs4_add_expiring(dentry); >- spin_lock(&dentry->d_lock); >- __d_drop(dentry); >- spin_unlock(&dentry->d_lock); >+ d_drop(dentry); > spin_unlock(&sbi->lookup_lock); > > return 0; >@@ -678,15 +669,12 @@ static int autofs4_dir_rmdir(struct inode *dir, struct dentry *dentry) > return -EACCES; > > spin_lock(&sbi->lookup_lock); >- spin_lock(&dentry->d_lock); >- if (!list_empty(&dentry->d_subdirs)) { >- spin_unlock(&dentry->d_lock); >+ if (!simple_empty(dentry)) { > spin_unlock(&sbi->lookup_lock); > return -ENOTEMPTY; > } > __autofs4_add_expiring(dentry); >- __d_drop(dentry); >- spin_unlock(&dentry->d_lock); >+ d_drop(dentry); > spin_unlock(&sbi->lookup_lock); > > if (sbi->version < 5)
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 833535
:
593444
|
609140
|
610823
|
611990
|
625260
|
636456
|
641908
|
647703
| 647705 |
649476
|
672268
|
672270