diff options
author | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
commit | 94bc2be31a01a3055ec94176e595dfe208e92d3b (patch) | |
tree | ebfbe81c6718a6390bfa1b99c6d228237d818576 /fs/cifs | |
parent | c32a0b689cb9cc160cfcd19735bbf50bb70c6ef4 (diff) | |
parent | 58cba4650a7a414eabd2b40cc9d8e45fcdf192d9 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifs_uniupr.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 6 | ||||
-rw-r--r-- | fs/cifs/file.c | 6 | ||||
-rw-r--r-- | fs/cifs/inode.c | 11 |
4 files changed, 11 insertions, 14 deletions
diff --git a/fs/cifs/cifs_uniupr.h b/fs/cifs/cifs_uniupr.h index decd138f14d4..da2ad5b451ac 100644 --- a/fs/cifs/cifs_uniupr.h +++ b/fs/cifs/cifs_uniupr.h | |||
@@ -242,7 +242,7 @@ static signed char UniCaseRangeLff20[27] = { | |||
242 | /* | 242 | /* |
243 | * Lower Case Range | 243 | * Lower Case Range |
244 | */ | 244 | */ |
245 | const static struct UniCaseRange CifsUniLowerRange[] = { | 245 | static const struct UniCaseRange CifsUniLowerRange[] = { |
246 | 0x0380, 0x03ab, UniCaseRangeL0380, | 246 | 0x0380, 0x03ab, UniCaseRangeL0380, |
247 | 0x0400, 0x042f, UniCaseRangeL0400, | 247 | 0x0400, 0x042f, UniCaseRangeL0400, |
248 | 0x0490, 0x04cb, UniCaseRangeL0490, | 248 | 0x0490, 0x04cb, UniCaseRangeL0490, |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 136af8a08f45..79eeccd0437f 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -874,9 +874,9 @@ static int cifs_oplock_thread(void * dummyarg) | |||
874 | DeleteOplockQEntry(oplock_item); | 874 | DeleteOplockQEntry(oplock_item); |
875 | /* can not grab inode sem here since it would | 875 | /* can not grab inode sem here since it would |
876 | deadlock when oplock received on delete | 876 | deadlock when oplock received on delete |
877 | since vfs_unlink holds the i_sem across | 877 | since vfs_unlink holds the i_mutex across |
878 | the call */ | 878 | the call */ |
879 | /* down(&inode->i_sem);*/ | 879 | /* mutex_lock(&inode->i_mutex);*/ |
880 | if (S_ISREG(inode->i_mode)) { | 880 | if (S_ISREG(inode->i_mode)) { |
881 | rc = filemap_fdatawrite(inode->i_mapping); | 881 | rc = filemap_fdatawrite(inode->i_mapping); |
882 | if(CIFS_I(inode)->clientCanCacheRead == 0) { | 882 | if(CIFS_I(inode)->clientCanCacheRead == 0) { |
@@ -885,7 +885,7 @@ static int cifs_oplock_thread(void * dummyarg) | |||
885 | } | 885 | } |
886 | } else | 886 | } else |
887 | rc = 0; | 887 | rc = 0; |
888 | /* up(&inode->i_sem);*/ | 888 | /* mutex_unlock(&inode->i_mutex);*/ |
889 | if (rc) | 889 | if (rc) |
890 | CIFS_I(inode)->write_behind_rc = rc; | 890 | CIFS_I(inode)->write_behind_rc = rc; |
891 | cFYI(1,("Oplock flush inode %p rc %d",inode,rc)); | 891 | cFYI(1,("Oplock flush inode %p rc %d",inode,rc)); |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 670ec1e84da0..378095a442d0 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -127,8 +127,7 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
127 | if (file->f_dentry->d_inode->i_mapping) { | 127 | if (file->f_dentry->d_inode->i_mapping) { |
128 | /* BB no need to lock inode until after invalidate | 128 | /* BB no need to lock inode until after invalidate |
129 | since namei code should already have it locked? */ | 129 | since namei code should already have it locked? */ |
130 | filemap_fdatawrite(file->f_dentry->d_inode->i_mapping); | 130 | filemap_write_and_wait(file->f_dentry->d_inode->i_mapping); |
131 | filemap_fdatawait(file->f_dentry->d_inode->i_mapping); | ||
132 | } | 131 | } |
133 | cFYI(1, ("invalidating remote inode since open detected it " | 132 | cFYI(1, ("invalidating remote inode since open detected it " |
134 | "changed")); | 133 | "changed")); |
@@ -419,8 +418,7 @@ static int cifs_reopen_file(struct inode *inode, struct file *file, | |||
419 | pCifsInode = CIFS_I(inode); | 418 | pCifsInode = CIFS_I(inode); |
420 | if (pCifsInode) { | 419 | if (pCifsInode) { |
421 | if (can_flush) { | 420 | if (can_flush) { |
422 | filemap_fdatawrite(inode->i_mapping); | 421 | filemap_write_and_wait(inode->i_mapping); |
423 | filemap_fdatawait(inode->i_mapping); | ||
424 | /* temporarily disable caching while we | 422 | /* temporarily disable caching while we |
425 | go to server to get inode info */ | 423 | go to server to get inode info */ |
426 | pCifsInode->clientCanCacheAll = FALSE; | 424 | pCifsInode->clientCanCacheAll = FALSE; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index f65310cc60a1..59359911f481 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1041,9 +1041,9 @@ int cifs_revalidate(struct dentry *direntry) | |||
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | /* can not grab this sem since kernel filesys locking documentation | 1043 | /* can not grab this sem since kernel filesys locking documentation |
1044 | indicates i_sem may be taken by the kernel on lookup and rename | 1044 | indicates i_mutex may be taken by the kernel on lookup and rename |
1045 | which could deadlock if we grab the i_sem here as well */ | 1045 | which could deadlock if we grab the i_mutex here as well */ |
1046 | /* down(&direntry->d_inode->i_sem);*/ | 1046 | /* mutex_lock(&direntry->d_inode->i_mutex);*/ |
1047 | /* need to write out dirty pages here */ | 1047 | /* need to write out dirty pages here */ |
1048 | if (direntry->d_inode->i_mapping) { | 1048 | if (direntry->d_inode->i_mapping) { |
1049 | /* do we need to lock inode until after invalidate completes | 1049 | /* do we need to lock inode until after invalidate completes |
@@ -1067,7 +1067,7 @@ int cifs_revalidate(struct dentry *direntry) | |||
1067 | } | 1067 | } |
1068 | } | 1068 | } |
1069 | } | 1069 | } |
1070 | /* up(&direntry->d_inode->i_sem); */ | 1070 | /* mutex_unlock(&direntry->d_inode->i_mutex); */ |
1071 | 1071 | ||
1072 | kfree(full_path); | 1072 | kfree(full_path); |
1073 | FreeXid(xid); | 1073 | FreeXid(xid); |
@@ -1149,8 +1149,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1149 | /* BB check if we need to refresh inode from server now ? BB */ | 1149 | /* BB check if we need to refresh inode from server now ? BB */ |
1150 | 1150 | ||
1151 | /* need to flush data before changing file size on server */ | 1151 | /* need to flush data before changing file size on server */ |
1152 | filemap_fdatawrite(direntry->d_inode->i_mapping); | 1152 | filemap_write_and_wait(direntry->d_inode->i_mapping); |
1153 | filemap_fdatawait(direntry->d_inode->i_mapping); | ||
1154 | 1153 | ||
1155 | if (attrs->ia_valid & ATTR_SIZE) { | 1154 | if (attrs->ia_valid & ATTR_SIZE) { |
1156 | /* To avoid spurious oplock breaks from server, in the case of | 1155 | /* To avoid spurious oplock breaks from server, in the case of |