diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
tree | 421fa29aedff988e392f92780637553e275d37a0 /fs/cifs | |
parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsfs.c | 13 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/file.c | 26 |
3 files changed, 20 insertions, 21 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 3fdc2258f447..8b4de6eaabd0 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -166,8 +166,9 @@ cifs_put_super(struct super_block *sb) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | static int | 168 | static int |
169 | cifs_statfs(struct super_block *sb, struct kstatfs *buf) | 169 | cifs_statfs(struct dentry *dentry, struct kstatfs *buf) |
170 | { | 170 | { |
171 | struct super_block *sb = dentry->d_sb; | ||
171 | int xid; | 172 | int xid; |
172 | int rc = -EOPNOTSUPP; | 173 | int rc = -EOPNOTSUPP; |
173 | struct cifs_sb_info *cifs_sb; | 174 | struct cifs_sb_info *cifs_sb; |
@@ -462,9 +463,9 @@ struct super_operations cifs_super_ops = { | |||
462 | .remount_fs = cifs_remount, | 463 | .remount_fs = cifs_remount, |
463 | }; | 464 | }; |
464 | 465 | ||
465 | static struct super_block * | 466 | static int |
466 | cifs_get_sb(struct file_system_type *fs_type, | 467 | cifs_get_sb(struct file_system_type *fs_type, |
467 | int flags, const char *dev_name, void *data) | 468 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) |
468 | { | 469 | { |
469 | int rc; | 470 | int rc; |
470 | struct super_block *sb = sget(fs_type, NULL, set_anon_super, NULL); | 471 | struct super_block *sb = sget(fs_type, NULL, set_anon_super, NULL); |
@@ -472,7 +473,7 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
472 | cFYI(1, ("Devname: %s flags: %d ", dev_name, flags)); | 473 | cFYI(1, ("Devname: %s flags: %d ", dev_name, flags)); |
473 | 474 | ||
474 | if (IS_ERR(sb)) | 475 | if (IS_ERR(sb)) |
475 | return sb; | 476 | return PTR_ERR(sb); |
476 | 477 | ||
477 | sb->s_flags = flags; | 478 | sb->s_flags = flags; |
478 | 479 | ||
@@ -480,10 +481,10 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
480 | if (rc) { | 481 | if (rc) { |
481 | up_write(&sb->s_umount); | 482 | up_write(&sb->s_umount); |
482 | deactivate_super(sb); | 483 | deactivate_super(sb); |
483 | return ERR_PTR(rc); | 484 | return rc; |
484 | } | 485 | } |
485 | sb->s_flags |= MS_ACTIVE; | 486 | sb->s_flags |= MS_ACTIVE; |
486 | return sb; | 487 | return simple_set_mnt(mnt, sb); |
487 | } | 488 | } |
488 | 489 | ||
489 | static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov, | 490 | static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov, |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index c98755dca868..d56c0577c710 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -74,7 +74,7 @@ extern ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
74 | size_t write_size, loff_t * poffset); | 74 | size_t write_size, loff_t * poffset); |
75 | extern int cifs_lock(struct file *, int, struct file_lock *); | 75 | extern int cifs_lock(struct file *, int, struct file_lock *); |
76 | extern int cifs_fsync(struct file *, struct dentry *, int); | 76 | extern int cifs_fsync(struct file *, struct dentry *, int); |
77 | extern int cifs_flush(struct file *); | 77 | extern int cifs_flush(struct file *, fl_owner_t id); |
78 | extern int cifs_file_mmap(struct file * , struct vm_area_struct *); | 78 | extern int cifs_file_mmap(struct file * , struct vm_area_struct *); |
79 | extern const struct file_operations cifs_dir_ops; | 79 | extern const struct file_operations cifs_dir_ops; |
80 | extern int cifs_dir_open(struct inode *inode, struct file *file); | 80 | extern int cifs_dir_open(struct inode *inode, struct file *file); |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e2b4ce1dad66..b4a18c1cab0a 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1079,9 +1079,9 @@ static int cifs_writepages(struct address_space *mapping, | |||
1079 | unsigned int bytes_written; | 1079 | unsigned int bytes_written; |
1080 | struct cifs_sb_info *cifs_sb; | 1080 | struct cifs_sb_info *cifs_sb; |
1081 | int done = 0; | 1081 | int done = 0; |
1082 | pgoff_t end = -1; | 1082 | pgoff_t end; |
1083 | pgoff_t index; | 1083 | pgoff_t index; |
1084 | int is_range = 0; | 1084 | int range_whole = 0; |
1085 | struct kvec iov[32]; | 1085 | struct kvec iov[32]; |
1086 | int len; | 1086 | int len; |
1087 | int n_iov = 0; | 1087 | int n_iov = 0; |
@@ -1122,16 +1122,14 @@ static int cifs_writepages(struct address_space *mapping, | |||
1122 | xid = GetXid(); | 1122 | xid = GetXid(); |
1123 | 1123 | ||
1124 | pagevec_init(&pvec, 0); | 1124 | pagevec_init(&pvec, 0); |
1125 | if (wbc->sync_mode == WB_SYNC_NONE) | 1125 | if (wbc->range_cyclic) { |
1126 | index = mapping->writeback_index; /* Start from prev offset */ | 1126 | index = mapping->writeback_index; /* Start from prev offset */ |
1127 | else { | 1127 | end = -1; |
1128 | index = 0; | 1128 | } else { |
1129 | scanned = 1; | 1129 | index = wbc->range_start >> PAGE_CACHE_SHIFT; |
1130 | } | 1130 | end = wbc->range_end >> PAGE_CACHE_SHIFT; |
1131 | if (wbc->start || wbc->end) { | 1131 | if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX) |
1132 | index = wbc->start >> PAGE_CACHE_SHIFT; | 1132 | range_whole = 1; |
1133 | end = wbc->end >> PAGE_CACHE_SHIFT; | ||
1134 | is_range = 1; | ||
1135 | scanned = 1; | 1133 | scanned = 1; |
1136 | } | 1134 | } |
1137 | retry: | 1135 | retry: |
@@ -1167,7 +1165,7 @@ retry: | |||
1167 | break; | 1165 | break; |
1168 | } | 1166 | } |
1169 | 1167 | ||
1170 | if (unlikely(is_range) && (page->index > end)) { | 1168 | if (!wbc->range_cyclic && page->index > end) { |
1171 | done = 1; | 1169 | done = 1; |
1172 | unlock_page(page); | 1170 | unlock_page(page); |
1173 | break; | 1171 | break; |
@@ -1271,7 +1269,7 @@ retry: | |||
1271 | index = 0; | 1269 | index = 0; |
1272 | goto retry; | 1270 | goto retry; |
1273 | } | 1271 | } |
1274 | if (!is_range) | 1272 | if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0)) |
1275 | mapping->writeback_index = index; | 1273 | mapping->writeback_index = index; |
1276 | 1274 | ||
1277 | FreeXid(xid); | 1275 | FreeXid(xid); |
@@ -1419,7 +1417,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1419 | * As file closes, flush all cached write data for this inode checking | 1417 | * As file closes, flush all cached write data for this inode checking |
1420 | * for write behind errors. | 1418 | * for write behind errors. |
1421 | */ | 1419 | */ |
1422 | int cifs_flush(struct file *file) | 1420 | int cifs_flush(struct file *file, fl_owner_t id) |
1423 | { | 1421 | { |
1424 | struct inode * inode = file->f_dentry->d_inode; | 1422 | struct inode * inode = file->f_dentry->d_inode; |
1425 | int rc = 0; | 1423 | int rc = 0; |