aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-01-09 18:59:24 -0500
committerIngo Molnar <mingo@hera.kernel.org>2006-01-09 18:59:24 -0500
commit1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch)
treeb0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/cifs
parent794ee1baee1c26be40410233e6c20bceb2b03c08 (diff)
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c6
-rw-r--r--fs/cifs/inode.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 2a13a2bac8f1..e10213b7541e 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -860,9 +860,9 @@ static int cifs_oplock_thread(void * dummyarg)
860 DeleteOplockQEntry(oplock_item); 860 DeleteOplockQEntry(oplock_item);
861 /* can not grab inode sem here since it would 861 /* can not grab inode sem here since it would
862 deadlock when oplock received on delete 862 deadlock when oplock received on delete
863 since vfs_unlink holds the i_sem across 863 since vfs_unlink holds the i_mutex across
864 the call */ 864 the call */
865 /* down(&inode->i_sem);*/ 865 /* mutex_lock(&inode->i_mutex);*/
866 if (S_ISREG(inode->i_mode)) { 866 if (S_ISREG(inode->i_mode)) {
867 rc = filemap_fdatawrite(inode->i_mapping); 867 rc = filemap_fdatawrite(inode->i_mapping);
868 if(CIFS_I(inode)->clientCanCacheRead == 0) { 868 if(CIFS_I(inode)->clientCanCacheRead == 0) {
@@ -871,7 +871,7 @@ static int cifs_oplock_thread(void * dummyarg)
871 } 871 }
872 } else 872 } else
873 rc = 0; 873 rc = 0;
874 /* up(&inode->i_sem);*/ 874 /* mutex_unlock(&inode->i_mutex);*/
875 if (rc) 875 if (rc)
876 CIFS_I(inode)->write_behind_rc = rc; 876 CIFS_I(inode)->write_behind_rc = rc;
877 cFYI(1,("Oplock flush inode %p rc %d",inode,rc)); 877 cFYI(1,("Oplock flush inode %p rc %d",inode,rc));
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 9558f51bca55..3ebce9430f4a 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1040,9 +1040,9 @@ int cifs_revalidate(struct dentry *direntry)
1040 } 1040 }
1041 1041
1042 /* can not grab this sem since kernel filesys locking documentation 1042 /* can not grab this sem since kernel filesys locking documentation
1043 indicates i_sem may be taken by the kernel on lookup and rename 1043 indicates i_mutex may be taken by the kernel on lookup and rename
1044 which could deadlock if we grab the i_sem here as well */ 1044 which could deadlock if we grab the i_mutex here as well */
1045/* down(&direntry->d_inode->i_sem);*/ 1045/* mutex_lock(&direntry->d_inode->i_mutex);*/
1046 /* need to write out dirty pages here */ 1046 /* need to write out dirty pages here */
1047 if (direntry->d_inode->i_mapping) { 1047 if (direntry->d_inode->i_mapping) {
1048 /* do we need to lock inode until after invalidate completes 1048 /* do we need to lock inode until after invalidate completes
@@ -1066,7 +1066,7 @@ int cifs_revalidate(struct dentry *direntry)
1066 } 1066 }
1067 } 1067 }
1068 } 1068 }
1069/* up(&direntry->d_inode->i_sem); */ 1069/* mutex_unlock(&direntry->d_inode->i_mutex); */
1070 1070
1071 kfree(full_path); 1071 kfree(full_path);
1072 FreeXid(xid); 1072 FreeXid(xid);