Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 82766 Details for
Bug 127073
unionfs 1.1.3 doesn't work with kernel 2.6.16
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
semaphore to mutex patch for unionfs-1.1.3
unionfs_2.6.16_mutex.diff (text/plain), 8.25 KB, created by
Diego Busacca
on 2006-03-21 04:46:32 UTC
(
hide
)
Description:
semaphore to mutex patch for unionfs-1.1.3
Filename:
MIME Type:
Creator:
Diego Busacca
Created:
2006-03-21 04:46:32 UTC
Size:
8.25 KB
patch
obsolete
>diff -u -p unionfs-1.1.3/copyup.c unionfs-1.1.3/copyup.c >--- unionfs-1.1.3/copyup.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/copyup.c 2006-03-21 13:02:08.000000000 +0100 >@@ -64,7 +64,7 @@ static int copyup_xattrs(struct dentry * > name_list_orig = name_list; > while (*name_list) { > ssize_t size; >- down(&old_hidden_dentry->d_inode->i_sem); >+ mutex_lock(&old_hidden_dentry->d_inode->i_mutex); > err = security_inode_getxattr(old_hidden_dentry, name_list); > if (err) > size = err; >@@ -73,7 +73,7 @@ static int copyup_xattrs(struct dentry * > old_hidden_dentry->d_inode->i_op-> > getxattr(old_hidden_dentry, name_list, attr_value, > XATTR_SIZE_MAX); >- up(&old_hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&old_hidden_dentry->d_inode->i_mutex); > if (size < 0) { > err = size; > goto out; >@@ -84,7 +84,7 @@ static int copyup_xattrs(struct dentry * > goto out; > } > >- down(&new_hidden_dentry->d_inode->i_sem); >+ mutex_lock(&new_hidden_dentry->d_inode->i_mutex); > > err = > security_inode_setxattr(old_hidden_dentry, name_list, >@@ -101,7 +101,7 @@ static int copyup_xattrs(struct dentry * > attr_value, size, > 0); > } >- up(&new_hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&new_hidden_dentry->d_inode->i_mutex); > > if (err < 0) > goto out; >Common subdirectories: unionfs-1.1.3/debian and unionfs-1.1.3/debian >diff -u -p unionfs-1.1.3/dentry.c unionfs-1.1.3/dentry.c >--- unionfs-1.1.3/dentry.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/dentry.c 2006-03-21 13:02:08.000000000 +0100 >@@ -108,7 +108,7 @@ int unionfs_d_revalidate(struct dentry * > interpose_flag = INTERPOSE_REVAL_NEG; > if (positive) { > interpose_flag = INTERPOSE_REVAL; >- down(&dentry->d_inode->i_sem); >+ mutex_lock(&dentry->d_inode->i_mutex); > bstart = ibstart(dentry->d_inode); > bend = ibend(dentry->d_inode); > if (bstart >= 0) { >@@ -126,7 +126,7 @@ int unionfs_d_revalidate(struct dentry * > itohi_ptr(dentry->d_inode) = NULL; > ibstart(dentry->d_inode) = -1; > ibend(dentry->d_inode) = -1; >- up(&dentry->d_inode->i_sem); >+ mutex_unlock(&dentry->d_inode->i_mutex); > } > > result = unionfs_lookup_backend(dentry, interpose_flag); >diff -u -p unionfs-1.1.3/dirhelper.c unionfs-1.1.3/dirhelper.c >--- unionfs-1.1.3/dirhelper.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/dirhelper.c 2006-03-21 13:02:08.000000000 +0100 >@@ -78,11 +78,11 @@ int delete_whiteouts(struct dentry *dent > continue; > } > >- down(&hidden_dir_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dir_dentry->d_inode->i_mutex); > err = > vfs_unlink(hidden_dir_dentry->d_inode, > hidden_dentry); >- up(&hidden_dir_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dir_dentry->d_inode->i_mutex); > DPUT(hidden_dentry); > > if (err && !IS_COPYUP_ERR(err)) >diff -u -p unionfs-1.1.3/file.c unionfs-1.1.3/file.c >--- unionfs-1.1.3/file.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/file.c 2006-03-21 13:02:08.000000000 +0100 >@@ -264,10 +264,10 @@ static int unionfs_fsync(struct file *fi > if (!hidden_file->f_op || !hidden_file->f_op->fsync) > goto out; > >- down(&hidden_file->f_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_file->f_dentry->d_inode->i_mutex); > err = hidden_file->f_op->fsync(hidden_file, hidden_file->f_dentry, > datasync); >- up(&hidden_file->f_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_file->f_dentry->d_inode->i_mutex); > > out: > print_exit_status(err); >diff -u -p unionfs-1.1.3/inode.c unionfs-1.1.3/inode.c >--- unionfs-1.1.3/inode.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/inode.c 2006-03-21 13:02:08.000000000 +0100 >@@ -81,7 +81,7 @@ static int unionfs_create(struct inode * > struct dentry *hidden_dir_dentry; > struct iattr newattrs; > >- down(&whiteout_dentry->d_inode->i_sem); >+ mutex_lock(&whiteout_dentry->d_inode->i_mutex); > newattrs.ia_valid = ATTR_CTIME | ATTR_MODE | ATTR_ATIME > | ATTR_MTIME | ATTR_UID | ATTR_GID | ATTR_FORCE > | ATTR_KILL_SUID | ATTR_KILL_SGID; >@@ -97,7 +97,7 @@ static int unionfs_create(struct inode * > > err = notify_change(whiteout_dentry, &newattrs); > >- up(&whiteout_dentry->d_inode->i_sem); >+ mutex_unlock(&whiteout_dentry->d_inode->i_mutex); > > if (err) > printk(KERN_WARNING >@@ -594,10 +594,10 @@ static int unionfs_mkdir(struct inode *p > err = PTR_ERR(whiteout_dentry); > goto out; > } >- down(&hidden_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dentry->d_inode->i_mutex); > err = vfs_create(hidden_dentry->d_inode, > whiteout_dentry, 0600, NULL); >- up(&hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dentry->d_inode->i_mutex); > DPUT(whiteout_dentry); > > if (err) { >diff -u -p unionfs-1.1.3/main.c unionfs-1.1.3/main.c >--- unionfs-1.1.3/main.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/main.c 2006-03-21 13:02:08.000000000 +0100 >@@ -103,7 +103,7 @@ int unionfs_interpose(struct dentry *den > } > } > >- down(&inode->i_sem); >+ mutex_lock(&inode->i_mutex); > if (atomic_read(&inode->i_count) > 1) > goto skip; > >@@ -172,7 +172,7 @@ int unionfs_interpose(struct dentry *den > > fist_print_dentry("Leaving unionfs_interpose", dentry); > fist_print_inode("Leaving unionfs_interpose", inode); >- up(&inode->i_sem); >+ mutex_unlock(&inode->i_mutex); > > out: > print_exit_status(err); >Common subdirectories: unionfs-1.1.3/man and unionfs-1.1.3/man >Common subdirectories: unionfs-1.1.3/regression and unionfs-1.1.3/regression >Common subdirectories: unionfs-1.1.3/rpm and unionfs-1.1.3/rpm >diff -u -p unionfs-1.1.3/unionfs.h unionfs-1.1.3/unionfs.h >--- unionfs-1.1.3/unionfs.h 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/unionfs.h 2006-03-21 13:02:08.000000000 +0100 >@@ -776,13 +776,13 @@ static inline struct dentry *lock_parent > { > struct dentry *dir = DGET(dentry->d_parent); > >- down(&dir->d_inode->i_sem); >+ mutex_lock(&dir->d_inode->i_mutex); > return dir; > } > > static inline void unlock_dir(struct dentry *dir) > { >- up(&dir->d_inode->i_sem); >+ mutex_unlock(&dir->d_inode->i_mutex); > DPUT(dir); > } > >diff -u -p unionfs-1.1.3/xattr.c unionfs-1.1.3/xattr.c >--- unionfs-1.1.3/xattr.c 2006-02-20 23:47:06.000000000 +0100 >+++ unionfs-1.1.3/xattr.c 2006-03-21 13:02:08.000000000 +0100 >@@ -77,14 +77,14 @@ ssize_t unionfs_getxattr(struct dentry * > > encoded_value = (char *)value; > >- down(&hidden_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dentry->d_inode->i_mutex); > /* lock_kernel() already done by caller. */ > err = > hidden_dentry->d_inode->i_op->getxattr(hidden_dentry, > encoded_name, > encoded_value, size); > /* unlock_kernel() will be done by caller. */ >- up(&hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dentry->d_inode->i_mutex); > > } > >@@ -112,12 +112,12 @@ unionfs_setxattr(struct dentry *dentry, > name, (unsigned long)size, flags); > > if (hidden_dentry->d_inode->i_op->setxattr) { >- down(&hidden_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dentry->d_inode->i_mutex); > /* lock_kernel() already done by caller. */ > err = hidden_dentry->d_inode->i_op-> > setxattr(hidden_dentry, name, value, size, flags); > /* unlock_kernel() will be done by caller. */ >- up(&hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dentry->d_inode->i_mutex); > } > > unlock_dentry(dentry); >@@ -143,13 +143,13 @@ int unionfs_removexattr(struct dentry *d > if (hidden_dentry->d_inode->i_op->removexattr) { > encoded_name = (char *)name; > >- down(&hidden_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dentry->d_inode->i_mutex); > /* lock_kernel() already done by caller. */ > err = > hidden_dentry->d_inode->i_op->removexattr(hidden_dentry, > encoded_name); > /* unlock_kernel() will be done by caller. */ >- up(&hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dentry->d_inode->i_mutex); > } > > unlock_dentry(dentry); >@@ -173,13 +173,13 @@ ssize_t unionfs_listxattr(struct dentry > > if (hidden_dentry->d_inode->i_op->listxattr) { > encoded_list = list; >- down(&hidden_dentry->d_inode->i_sem); >+ mutex_lock(&hidden_dentry->d_inode->i_mutex); > /* lock_kernel() already done by caller. */ > err = > hidden_dentry->d_inode->i_op->listxattr(hidden_dentry, > encoded_list, size); > /* unlock_kernel() will be done by caller. */ >- up(&hidden_dentry->d_inode->i_sem); >+ mutex_unlock(&hidden_dentry->d_inode->i_mutex); > } > > unlock_dentry(dentry);
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 127073
: 82766 |
83856