diff options
Diffstat (limited to 'fs/smbfs')
-rw-r--r-- | fs/smbfs/cache.c | 4 | ||||
-rw-r--r-- | fs/smbfs/file.c | 7 | ||||
-rw-r--r-- | fs/smbfs/inode.c | 3 | ||||
-rw-r--r-- | fs/smbfs/proc.c | 3 |
4 files changed, 8 insertions, 9 deletions
diff --git a/fs/smbfs/cache.c b/fs/smbfs/cache.c index f3e6b81288ab..74b86d9725a6 100644 --- a/fs/smbfs/cache.c +++ b/fs/smbfs/cache.c | |||
@@ -66,7 +66,7 @@ smb_invalidate_dircache_entries(struct dentry *parent) | |||
66 | spin_lock(&dcache_lock); | 66 | spin_lock(&dcache_lock); |
67 | next = parent->d_subdirs.next; | 67 | next = parent->d_subdirs.next; |
68 | while (next != &parent->d_subdirs) { | 68 | while (next != &parent->d_subdirs) { |
69 | dentry = list_entry(next, struct dentry, d_child); | 69 | dentry = list_entry(next, struct dentry, d_u.d_child); |
70 | dentry->d_fsdata = NULL; | 70 | dentry->d_fsdata = NULL; |
71 | smb_age_dentry(server, dentry); | 71 | smb_age_dentry(server, dentry); |
72 | next = next->next; | 72 | next = next->next; |
@@ -100,7 +100,7 @@ smb_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos) | |||
100 | spin_lock(&dcache_lock); | 100 | spin_lock(&dcache_lock); |
101 | next = parent->d_subdirs.next; | 101 | next = parent->d_subdirs.next; |
102 | while (next != &parent->d_subdirs) { | 102 | while (next != &parent->d_subdirs) { |
103 | dent = list_entry(next, struct dentry, d_child); | 103 | dent = list_entry(next, struct dentry, d_u.d_child); |
104 | if ((unsigned long)dent->d_fsdata == fpos) { | 104 | if ((unsigned long)dent->d_fsdata == fpos) { |
105 | if (dent->d_inode) | 105 | if (dent->d_inode) |
106 | dget_locked(dent); | 106 | dget_locked(dent); |
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index b4fcfa8b55a1..7042e62726a4 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c | |||
@@ -209,8 +209,8 @@ smb_updatepage(struct file *file, struct page *page, unsigned long offset, | |||
209 | { | 209 | { |
210 | struct dentry *dentry = file->f_dentry; | 210 | struct dentry *dentry = file->f_dentry; |
211 | 211 | ||
212 | DEBUG1("(%s/%s %d@%ld)\n", DENTRY_PATH(dentry), | 212 | DEBUG1("(%s/%s %d@%lld)\n", DENTRY_PATH(dentry), count, |
213 | count, (page->index << PAGE_CACHE_SHIFT)+offset); | 213 | ((unsigned long long)page->index << PAGE_CACHE_SHIFT) + offset); |
214 | 214 | ||
215 | return smb_writepage_sync(dentry->d_inode, page, offset, count); | 215 | return smb_writepage_sync(dentry->d_inode, page, offset, count); |
216 | } | 216 | } |
@@ -374,8 +374,7 @@ smb_file_release(struct inode *inode, struct file * file) | |||
374 | /* We must flush any dirty pages now as we won't be able to | 374 | /* We must flush any dirty pages now as we won't be able to |
375 | write anything after close. mmap can trigger this. | 375 | write anything after close. mmap can trigger this. |
376 | "openers" should perhaps include mmap'ers ... */ | 376 | "openers" should perhaps include mmap'ers ... */ |
377 | filemap_fdatawrite(inode->i_mapping); | 377 | filemap_write_and_wait(inode->i_mapping); |
378 | filemap_fdatawait(inode->i_mapping); | ||
379 | smb_close(inode); | 378 | smb_close(inode); |
380 | } | 379 | } |
381 | unlock_kernel(); | 380 | unlock_kernel(); |
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 10b994428fef..6ec88bf59b2d 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c | |||
@@ -697,8 +697,7 @@ smb_notify_change(struct dentry *dentry, struct iattr *attr) | |||
697 | DENTRY_PATH(dentry), | 697 | DENTRY_PATH(dentry), |
698 | (long) inode->i_size, (long) attr->ia_size); | 698 | (long) inode->i_size, (long) attr->ia_size); |
699 | 699 | ||
700 | filemap_fdatawrite(inode->i_mapping); | 700 | filemap_write_and_wait(inode->i_mapping); |
701 | filemap_fdatawait(inode->i_mapping); | ||
702 | 701 | ||
703 | error = smb_open(dentry, O_WRONLY); | 702 | error = smb_open(dentry, O_WRONLY); |
704 | if (error) | 703 | if (error) |
diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c index 38ab558835c4..b1b878b81730 100644 --- a/fs/smbfs/proc.c +++ b/fs/smbfs/proc.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/capability.h> | ||
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
@@ -3113,7 +3114,7 @@ smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, | |||
3113 | LSET(data, 32, SMB_TIME_NO_CHANGE); | 3114 | LSET(data, 32, SMB_TIME_NO_CHANGE); |
3114 | LSET(data, 40, SMB_UID_NO_CHANGE); | 3115 | LSET(data, 40, SMB_UID_NO_CHANGE); |
3115 | LSET(data, 48, SMB_GID_NO_CHANGE); | 3116 | LSET(data, 48, SMB_GID_NO_CHANGE); |
3116 | LSET(data, 56, smb_filetype_from_mode(attr->ia_mode)); | 3117 | DSET(data, 56, smb_filetype_from_mode(attr->ia_mode)); |
3117 | LSET(data, 60, major); | 3118 | LSET(data, 60, major); |
3118 | LSET(data, 68, minor); | 3119 | LSET(data, 68, minor); |
3119 | LSET(data, 76, 0); | 3120 | LSET(data, 76, 0); |