diff options
author | Steve French <sfrench@us.ibm.com> | 2006-03-30 22:35:56 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-03-30 22:35:56 -0500 |
commit | d62e54abca1146981fc9f98f85ff398a113a22c2 (patch) | |
tree | 870420dbc4c65e716dcef8a802aafdc0ef97a8b4 /fs/cifs | |
parent | fd4a0b92db6a57cba8d03efbe1cebf91f9124ce0 (diff) | |
parent | ce362c009250340358a7221f3cdb7954cbf19c01 (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/CHANGES | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 33 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 10 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 2 | ||||
-rw-r--r-- | fs/cifs/dir.c | 8 | ||||
-rw-r--r-- | fs/cifs/fcntl.c | 4 | ||||
-rw-r--r-- | fs/cifs/file.c | 10 | ||||
-rw-r--r-- | fs/cifs/inode.c | 22 | ||||
-rw-r--r-- | fs/cifs/link.c | 16 | ||||
-rw-r--r-- | fs/cifs/readdir.c | 12 | ||||
-rw-r--r-- | fs/cifs/xattr.c | 16 |
11 files changed, 66 insertions, 69 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 3e0fcc394810..8a2de038882e 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -178,7 +178,7 @@ improperly zeroed buffer in CIFS Unix extensions set times call. | |||
178 | Version 1.25 | 178 | Version 1.25 |
179 | ------------ | 179 | ------------ |
180 | Fix internationalization problem in cifs readdir with filenames that map to | 180 | Fix internationalization problem in cifs readdir with filenames that map to |
181 | longer UTF8 strings than the string on the wire was in Unicode. Add workaround | 181 | longer UTF-8 strings than the string on the wire was in Unicode. Add workaround |
182 | for readdir to netapp servers. Fix search rewind (seek into readdir to return | 182 | for readdir to netapp servers. Fix search rewind (seek into readdir to return |
183 | non-consecutive entries). Do not do readdir when server negotiates | 183 | non-consecutive entries). Do not do readdir when server negotiates |
184 | buffer size to small to fit filename. Add support for reading POSIX ACLs from | 184 | buffer size to small to fit filename. Add support for reading POSIX ACLs from |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 8219c02145a7..d4b713e5affb 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -476,7 +476,7 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
476 | 476 | ||
477 | sb->s_flags = flags; | 477 | sb->s_flags = flags; |
478 | 478 | ||
479 | rc = cifs_read_super(sb, data, dev_name, flags & MS_VERBOSE ? 1 : 0); | 479 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
480 | if (rc) { | 480 | if (rc) { |
481 | up_write(&sb->s_umount); | 481 | up_write(&sb->s_umount); |
482 | deactivate_super(sb); | 482 | deactivate_super(sb); |
@@ -580,7 +580,7 @@ struct inode_operations cifs_symlink_inode_ops = { | |||
580 | #endif | 580 | #endif |
581 | }; | 581 | }; |
582 | 582 | ||
583 | struct file_operations cifs_file_ops = { | 583 | const struct file_operations cifs_file_ops = { |
584 | .read = do_sync_read, | 584 | .read = do_sync_read, |
585 | .write = do_sync_write, | 585 | .write = do_sync_write, |
586 | .readv = generic_file_readv, | 586 | .readv = generic_file_readv, |
@@ -604,7 +604,7 @@ struct file_operations cifs_file_ops = { | |||
604 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 604 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
605 | }; | 605 | }; |
606 | 606 | ||
607 | struct file_operations cifs_file_direct_ops = { | 607 | const struct file_operations cifs_file_direct_ops = { |
608 | /* no mmap, no aio, no readv - | 608 | /* no mmap, no aio, no readv - |
609 | BB reevaluate whether they can be done with directio, no cache */ | 609 | BB reevaluate whether they can be done with directio, no cache */ |
610 | .read = cifs_user_read, | 610 | .read = cifs_user_read, |
@@ -623,7 +623,7 @@ struct file_operations cifs_file_direct_ops = { | |||
623 | .dir_notify = cifs_dir_notify, | 623 | .dir_notify = cifs_dir_notify, |
624 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 624 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
625 | }; | 625 | }; |
626 | struct file_operations cifs_file_nobrl_ops = { | 626 | const struct file_operations cifs_file_nobrl_ops = { |
627 | .read = do_sync_read, | 627 | .read = do_sync_read, |
628 | .write = do_sync_write, | 628 | .write = do_sync_write, |
629 | .readv = generic_file_readv, | 629 | .readv = generic_file_readv, |
@@ -646,7 +646,7 @@ struct file_operations cifs_file_nobrl_ops = { | |||
646 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 646 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
647 | }; | 647 | }; |
648 | 648 | ||
649 | struct file_operations cifs_file_direct_nobrl_ops = { | 649 | const struct file_operations cifs_file_direct_nobrl_ops = { |
650 | /* no mmap, no aio, no readv - | 650 | /* no mmap, no aio, no readv - |
651 | BB reevaluate whether they can be done with directio, no cache */ | 651 | BB reevaluate whether they can be done with directio, no cache */ |
652 | .read = cifs_user_read, | 652 | .read = cifs_user_read, |
@@ -665,7 +665,7 @@ struct file_operations cifs_file_direct_nobrl_ops = { | |||
665 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 665 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
666 | }; | 666 | }; |
667 | 667 | ||
668 | struct file_operations cifs_dir_ops = { | 668 | const struct file_operations cifs_dir_ops = { |
669 | .readdir = cifs_readdir, | 669 | .readdir = cifs_readdir, |
670 | .release = cifs_closedir, | 670 | .release = cifs_closedir, |
671 | .read = generic_read_dir, | 671 | .read = generic_read_dir, |
@@ -692,7 +692,8 @@ cifs_init_inodecache(void) | |||
692 | { | 692 | { |
693 | cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", | 693 | cifs_inode_cachep = kmem_cache_create("cifs_inode_cache", |
694 | sizeof (struct cifsInodeInfo), | 694 | sizeof (struct cifsInodeInfo), |
695 | 0, SLAB_RECLAIM_ACCOUNT, | 695 | 0, (SLAB_RECLAIM_ACCOUNT| |
696 | SLAB_MEM_SPREAD), | ||
696 | cifs_init_once, NULL); | 697 | cifs_init_once, NULL); |
697 | if (cifs_inode_cachep == NULL) | 698 | if (cifs_inode_cachep == NULL) |
698 | return -ENOMEM; | 699 | return -ENOMEM; |
@@ -734,10 +735,8 @@ cifs_init_request_bufs(void) | |||
734 | cERROR(1,("cifs_min_rcv set to maximum (64)")); | 735 | cERROR(1,("cifs_min_rcv set to maximum (64)")); |
735 | } | 736 | } |
736 | 737 | ||
737 | cifs_req_poolp = mempool_create(cifs_min_rcv, | 738 | cifs_req_poolp = mempool_create_slab_pool(cifs_min_rcv, |
738 | mempool_alloc_slab, | 739 | cifs_req_cachep); |
739 | mempool_free_slab, | ||
740 | cifs_req_cachep); | ||
741 | 740 | ||
742 | if(cifs_req_poolp == NULL) { | 741 | if(cifs_req_poolp == NULL) { |
743 | kmem_cache_destroy(cifs_req_cachep); | 742 | kmem_cache_destroy(cifs_req_cachep); |
@@ -767,10 +766,8 @@ cifs_init_request_bufs(void) | |||
767 | cFYI(1,("cifs_min_small set to maximum (256)")); | 766 | cFYI(1,("cifs_min_small set to maximum (256)")); |
768 | } | 767 | } |
769 | 768 | ||
770 | cifs_sm_req_poolp = mempool_create(cifs_min_small, | 769 | cifs_sm_req_poolp = mempool_create_slab_pool(cifs_min_small, |
771 | mempool_alloc_slab, | 770 | cifs_sm_req_cachep); |
772 | mempool_free_slab, | ||
773 | cifs_sm_req_cachep); | ||
774 | 771 | ||
775 | if(cifs_sm_req_poolp == NULL) { | 772 | if(cifs_sm_req_poolp == NULL) { |
776 | mempool_destroy(cifs_req_poolp); | 773 | mempool_destroy(cifs_req_poolp); |
@@ -804,10 +801,8 @@ cifs_init_mids(void) | |||
804 | if (cifs_mid_cachep == NULL) | 801 | if (cifs_mid_cachep == NULL) |
805 | return -ENOMEM; | 802 | return -ENOMEM; |
806 | 803 | ||
807 | cifs_mid_poolp = mempool_create(3 /* a reasonable min simultan opers */, | 804 | /* 3 is a reasonable minimum number of simultaneous operations */ |
808 | mempool_alloc_slab, | 805 | cifs_mid_poolp = mempool_create_slab_pool(3, cifs_mid_cachep); |
809 | mempool_free_slab, | ||
810 | cifs_mid_cachep); | ||
811 | if(cifs_mid_poolp == NULL) { | 806 | if(cifs_mid_poolp == NULL) { |
812 | kmem_cache_destroy(cifs_mid_cachep); | 807 | kmem_cache_destroy(cifs_mid_cachep); |
813 | return -ENOMEM; | 808 | return -ENOMEM; |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index b4dcdc2052a0..4e829dc672a6 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -61,10 +61,10 @@ extern struct inode_operations cifs_file_inode_ops; | |||
61 | extern struct inode_operations cifs_symlink_inode_ops; | 61 | extern struct inode_operations cifs_symlink_inode_ops; |
62 | 62 | ||
63 | /* Functions related to files and directories */ | 63 | /* Functions related to files and directories */ |
64 | extern struct file_operations cifs_file_ops; | 64 | extern const struct file_operations cifs_file_ops; |
65 | extern struct file_operations cifs_file_direct_ops; /* if directio mount */ | 65 | extern const struct file_operations cifs_file_direct_ops; /* if directio mount */ |
66 | extern struct file_operations cifs_file_nobrl_ops; | 66 | extern const struct file_operations cifs_file_nobrl_ops; |
67 | extern struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount */ | 67 | extern const struct file_operations cifs_file_direct_nobrl_ops; /* if directio mount */ |
68 | extern int cifs_open(struct inode *inode, struct file *file); | 68 | extern int cifs_open(struct inode *inode, struct file *file); |
69 | extern int cifs_close(struct inode *inode, struct file *file); | 69 | extern int cifs_close(struct inode *inode, struct file *file); |
70 | extern int cifs_closedir(struct inode *inode, struct file *file); | 70 | extern int cifs_closedir(struct inode *inode, struct file *file); |
@@ -76,7 +76,7 @@ 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 *); |
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 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); |
81 | extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir); | 81 | extern int cifs_readdir(struct file *file, void *direntry, filldir_t filldir); |
82 | extern int cifs_dir_notify(struct file *, unsigned long arg); | 82 | extern int cifs_dir_notify(struct file *, unsigned long arg); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index a5941872d3f7..d705500aa283 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -5023,7 +5023,7 @@ SetEARetry: | |||
5023 | parm_data->list_len = cpu_to_le32(count); | 5023 | parm_data->list_len = cpu_to_le32(count); |
5024 | parm_data->list[0].EA_flags = 0; | 5024 | parm_data->list[0].EA_flags = 0; |
5025 | /* we checked above that name len is less than 255 */ | 5025 | /* we checked above that name len is less than 255 */ |
5026 | parm_data->list[0].name_len = (__u8)name_len;; | 5026 | parm_data->list[0].name_len = (__u8)name_len; |
5027 | /* EA names are always ASCII */ | 5027 | /* EA names are always ASCII */ |
5028 | if(ea_name) | 5028 | if(ea_name) |
5029 | strncpy(parm_data->list[0].name,ea_name,name_len); | 5029 | strncpy(parm_data->list[0].name,ea_name,name_len); |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index ddd11fa15528..1d0ca3eaaca5 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -139,9 +139,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
139 | cifs_sb = CIFS_SB(inode->i_sb); | 139 | cifs_sb = CIFS_SB(inode->i_sb); |
140 | pTcon = cifs_sb->tcon; | 140 | pTcon = cifs_sb->tcon; |
141 | 141 | ||
142 | down(&direntry->d_sb->s_vfs_rename_sem); | 142 | mutex_lock(&direntry->d_sb->s_vfs_rename_mutex); |
143 | full_path = build_path_from_dentry(direntry); | 143 | full_path = build_path_from_dentry(direntry); |
144 | up(&direntry->d_sb->s_vfs_rename_sem); | 144 | mutex_unlock(&direntry->d_sb->s_vfs_rename_mutex); |
145 | if(full_path == NULL) { | 145 | if(full_path == NULL) { |
146 | FreeXid(xid); | 146 | FreeXid(xid); |
147 | return -ENOMEM; | 147 | return -ENOMEM; |
@@ -316,9 +316,9 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
316 | cifs_sb = CIFS_SB(inode->i_sb); | 316 | cifs_sb = CIFS_SB(inode->i_sb); |
317 | pTcon = cifs_sb->tcon; | 317 | pTcon = cifs_sb->tcon; |
318 | 318 | ||
319 | down(&direntry->d_sb->s_vfs_rename_sem); | 319 | mutex_lock(&direntry->d_sb->s_vfs_rename_mutex); |
320 | full_path = build_path_from_dentry(direntry); | 320 | full_path = build_path_from_dentry(direntry); |
321 | up(&direntry->d_sb->s_vfs_rename_sem); | 321 | mutex_unlock(&direntry->d_sb->s_vfs_rename_mutex); |
322 | if(full_path == NULL) | 322 | if(full_path == NULL) |
323 | rc = -ENOMEM; | 323 | rc = -ENOMEM; |
324 | else if (pTcon->ses->capabilities & CAP_UNIX) { | 324 | else if (pTcon->ses->capabilities & CAP_UNIX) { |
diff --git a/fs/cifs/fcntl.c b/fs/cifs/fcntl.c index a7a47bb36bf3..ec4dfe9bf5ef 100644 --- a/fs/cifs/fcntl.c +++ b/fs/cifs/fcntl.c | |||
@@ -86,9 +86,9 @@ int cifs_dir_notify(struct file * file, unsigned long arg) | |||
86 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 86 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); |
87 | pTcon = cifs_sb->tcon; | 87 | pTcon = cifs_sb->tcon; |
88 | 88 | ||
89 | down(&file->f_dentry->d_sb->s_vfs_rename_sem); | 89 | mutex_lock(&file->f_dentry->d_sb->s_vfs_rename_mutex); |
90 | full_path = build_path_from_dentry(file->f_dentry); | 90 | full_path = build_path_from_dentry(file->f_dentry); |
91 | up(&file->f_dentry->d_sb->s_vfs_rename_sem); | 91 | mutex_unlock(&file->f_dentry->d_sb->s_vfs_rename_mutex); |
92 | 92 | ||
93 | if(full_path == NULL) { | 93 | if(full_path == NULL) { |
94 | rc = -ENOMEM; | 94 | rc = -ENOMEM; |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 2c093de26225..5c497c529772 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -203,9 +203,9 @@ int cifs_open(struct inode *inode, struct file *file) | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | down(&inode->i_sb->s_vfs_rename_sem); | 206 | mutex_lock(&inode->i_sb->s_vfs_rename_mutex); |
207 | full_path = build_path_from_dentry(file->f_dentry); | 207 | full_path = build_path_from_dentry(file->f_dentry); |
208 | up(&inode->i_sb->s_vfs_rename_sem); | 208 | mutex_unlock(&inode->i_sb->s_vfs_rename_mutex); |
209 | if (full_path == NULL) { | 209 | if (full_path == NULL) { |
210 | FreeXid(xid); | 210 | FreeXid(xid); |
211 | return -ENOMEM; | 211 | return -ENOMEM; |
@@ -1377,7 +1377,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1377 | return rc; | 1377 | return rc; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /* static int cifs_sync_page(struct page *page) | 1380 | /* static void cifs_sync_page(struct page *page) |
1381 | { | 1381 | { |
1382 | struct address_space *mapping; | 1382 | struct address_space *mapping; |
1383 | struct inode *inode; | 1383 | struct inode *inode; |
@@ -1391,16 +1391,18 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1391 | return 0; | 1391 | return 0; |
1392 | inode = mapping->host; | 1392 | inode = mapping->host; |
1393 | if (!inode) | 1393 | if (!inode) |
1394 | return 0; */ | 1394 | return; */ |
1395 | 1395 | ||
1396 | /* fill in rpages then | 1396 | /* fill in rpages then |
1397 | result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ | 1397 | result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ |
1398 | 1398 | ||
1399 | /* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); | 1399 | /* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); |
1400 | 1400 | ||
1401 | #if 0 | ||
1401 | if (rc < 0) | 1402 | if (rc < 0) |
1402 | return rc; | 1403 | return rc; |
1403 | return 0; | 1404 | return 0; |
1405 | #endif | ||
1404 | } */ | 1406 | } */ |
1405 | 1407 | ||
1406 | /* | 1408 | /* |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index b21038b99fc2..e842ce9f6547 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -163,9 +163,9 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
163 | 163 | ||
164 | if (num_of_bytes < end_of_file) | 164 | if (num_of_bytes < end_of_file) |
165 | cFYI(1, ("allocation size less than end of file")); | 165 | cFYI(1, ("allocation size less than end of file")); |
166 | cFYI(1, | 166 | cFYI(1, ("Size %ld and blocks %llu", |
167 | ("Size %ld and blocks %ld", | 167 | (unsigned long) inode->i_size, |
168 | (unsigned long) inode->i_size, inode->i_blocks)); | 168 | (unsigned long long)inode->i_blocks)); |
169 | if (S_ISREG(inode->i_mode)) { | 169 | if (S_ISREG(inode->i_mode)) { |
170 | cFYI(1, ("File inode")); | 170 | cFYI(1, ("File inode")); |
171 | inode->i_op = &cifs_file_inode_ops; | 171 | inode->i_op = &cifs_file_inode_ops; |
@@ -574,9 +574,9 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry) | |||
574 | 574 | ||
575 | /* Unlink can be called from rename so we can not grab the sem here | 575 | /* Unlink can be called from rename so we can not grab the sem here |
576 | since we deadlock otherwise */ | 576 | since we deadlock otherwise */ |
577 | /* down(&direntry->d_sb->s_vfs_rename_sem);*/ | 577 | /* mutex_lock(&direntry->d_sb->s_vfs_rename_mutex);*/ |
578 | full_path = build_path_from_dentry(direntry); | 578 | full_path = build_path_from_dentry(direntry); |
579 | /* up(&direntry->d_sb->s_vfs_rename_sem);*/ | 579 | /* mutex_unlock(&direntry->d_sb->s_vfs_rename_mutex);*/ |
580 | if (full_path == NULL) { | 580 | if (full_path == NULL) { |
581 | FreeXid(xid); | 581 | FreeXid(xid); |
582 | return -ENOMEM; | 582 | return -ENOMEM; |
@@ -717,9 +717,9 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
717 | cifs_sb = CIFS_SB(inode->i_sb); | 717 | cifs_sb = CIFS_SB(inode->i_sb); |
718 | pTcon = cifs_sb->tcon; | 718 | pTcon = cifs_sb->tcon; |
719 | 719 | ||
720 | down(&inode->i_sb->s_vfs_rename_sem); | 720 | mutex_lock(&inode->i_sb->s_vfs_rename_mutex); |
721 | full_path = build_path_from_dentry(direntry); | 721 | full_path = build_path_from_dentry(direntry); |
722 | up(&inode->i_sb->s_vfs_rename_sem); | 722 | mutex_unlock(&inode->i_sb->s_vfs_rename_mutex); |
723 | if (full_path == NULL) { | 723 | if (full_path == NULL) { |
724 | FreeXid(xid); | 724 | FreeXid(xid); |
725 | return -ENOMEM; | 725 | return -ENOMEM; |
@@ -802,9 +802,9 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) | |||
802 | cifs_sb = CIFS_SB(inode->i_sb); | 802 | cifs_sb = CIFS_SB(inode->i_sb); |
803 | pTcon = cifs_sb->tcon; | 803 | pTcon = cifs_sb->tcon; |
804 | 804 | ||
805 | down(&inode->i_sb->s_vfs_rename_sem); | 805 | mutex_lock(&inode->i_sb->s_vfs_rename_mutex); |
806 | full_path = build_path_from_dentry(direntry); | 806 | full_path = build_path_from_dentry(direntry); |
807 | up(&inode->i_sb->s_vfs_rename_sem); | 807 | mutex_unlock(&inode->i_sb->s_vfs_rename_mutex); |
808 | if (full_path == NULL) { | 808 | if (full_path == NULL) { |
809 | FreeXid(xid); | 809 | FreeXid(xid); |
810 | return -ENOMEM; | 810 | return -ENOMEM; |
@@ -1136,9 +1136,9 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1136 | rc = 0; | 1136 | rc = 0; |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | down(&direntry->d_sb->s_vfs_rename_sem); | 1139 | mutex_lock(&direntry->d_sb->s_vfs_rename_mutex); |
1140 | full_path = build_path_from_dentry(direntry); | 1140 | full_path = build_path_from_dentry(direntry); |
1141 | up(&direntry->d_sb->s_vfs_rename_sem); | 1141 | mutex_unlock(&direntry->d_sb->s_vfs_rename_mutex); |
1142 | if (full_path == NULL) { | 1142 | if (full_path == NULL) { |
1143 | FreeXid(xid); | 1143 | FreeXid(xid); |
1144 | return -ENOMEM; | 1144 | return -ENOMEM; |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index ce86ec69fe01..9562f5bba65c 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -48,10 +48,10 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, | |||
48 | /* No need to check for cross device links since server will do that | 48 | /* No need to check for cross device links since server will do that |
49 | BB note DFS case in future though (when we may have to check) */ | 49 | BB note DFS case in future though (when we may have to check) */ |
50 | 50 | ||
51 | down(&inode->i_sb->s_vfs_rename_sem); | 51 | mutex_lock(&inode->i_sb->s_vfs_rename_mutex); |
52 | fromName = build_path_from_dentry(old_file); | 52 | fromName = build_path_from_dentry(old_file); |
53 | toName = build_path_from_dentry(direntry); | 53 | toName = build_path_from_dentry(direntry); |
54 | up(&inode->i_sb->s_vfs_rename_sem); | 54 | mutex_unlock(&inode->i_sb->s_vfs_rename_mutex); |
55 | if((fromName == NULL) || (toName == NULL)) { | 55 | if((fromName == NULL) || (toName == NULL)) { |
56 | rc = -ENOMEM; | 56 | rc = -ENOMEM; |
57 | goto cifs_hl_exit; | 57 | goto cifs_hl_exit; |
@@ -103,9 +103,9 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
103 | 103 | ||
104 | xid = GetXid(); | 104 | xid = GetXid(); |
105 | 105 | ||
106 | down(&direntry->d_sb->s_vfs_rename_sem); | 106 | mutex_lock(&direntry->d_sb->s_vfs_rename_mutex); |
107 | full_path = build_path_from_dentry(direntry); | 107 | full_path = build_path_from_dentry(direntry); |
108 | up(&direntry->d_sb->s_vfs_rename_sem); | 108 | mutex_unlock(&direntry->d_sb->s_vfs_rename_mutex); |
109 | 109 | ||
110 | if (!full_path) | 110 | if (!full_path) |
111 | goto out_no_free; | 111 | goto out_no_free; |
@@ -164,9 +164,9 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
164 | cifs_sb = CIFS_SB(inode->i_sb); | 164 | cifs_sb = CIFS_SB(inode->i_sb); |
165 | pTcon = cifs_sb->tcon; | 165 | pTcon = cifs_sb->tcon; |
166 | 166 | ||
167 | down(&inode->i_sb->s_vfs_rename_sem); | 167 | mutex_lock(&inode->i_sb->s_vfs_rename_mutex); |
168 | full_path = build_path_from_dentry(direntry); | 168 | full_path = build_path_from_dentry(direntry); |
169 | up(&inode->i_sb->s_vfs_rename_sem); | 169 | mutex_unlock(&inode->i_sb->s_vfs_rename_mutex); |
170 | 170 | ||
171 | if(full_path == NULL) { | 171 | if(full_path == NULL) { |
172 | FreeXid(xid); | 172 | FreeXid(xid); |
@@ -232,9 +232,9 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
232 | 232 | ||
233 | /* BB would it be safe against deadlock to grab this sem | 233 | /* BB would it be safe against deadlock to grab this sem |
234 | even though rename itself grabs the sem and calls lookup? */ | 234 | even though rename itself grabs the sem and calls lookup? */ |
235 | /* down(&inode->i_sb->s_vfs_rename_sem);*/ | 235 | /* mutex_lock(&inode->i_sb->s_vfs_rename_mutex);*/ |
236 | full_path = build_path_from_dentry(direntry); | 236 | full_path = build_path_from_dentry(direntry); |
237 | /* up(&inode->i_sb->s_vfs_rename_sem);*/ | 237 | /* mutex_unlock(&inode->i_sb->s_vfs_rename_mutex);*/ |
238 | 238 | ||
239 | if(full_path == NULL) { | 239 | if(full_path == NULL) { |
240 | FreeXid(xid); | 240 | FreeXid(xid); |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 405d4b7ec3ac..2f6e2825571e 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -197,10 +197,10 @@ static void fill_in_inode(struct inode *tmp_inode, | |||
197 | 197 | ||
198 | if (allocation_size < end_of_file) | 198 | if (allocation_size < end_of_file) |
199 | cFYI(1, ("May be sparse file, allocation less than file size")); | 199 | cFYI(1, ("May be sparse file, allocation less than file size")); |
200 | cFYI(1, | 200 | cFYI(1, ("File Size %ld and blocks %llu and blocksize %ld", |
201 | ("File Size %ld and blocks %ld and blocksize %ld", | 201 | (unsigned long)tmp_inode->i_size, |
202 | (unsigned long)tmp_inode->i_size, tmp_inode->i_blocks, | 202 | (unsigned long long)tmp_inode->i_blocks, |
203 | tmp_inode->i_blksize)); | 203 | tmp_inode->i_blksize)); |
204 | if (S_ISREG(tmp_inode->i_mode)) { | 204 | if (S_ISREG(tmp_inode->i_mode)) { |
205 | cFYI(1, ("File inode")); | 205 | cFYI(1, ("File inode")); |
206 | tmp_inode->i_op = &cifs_file_inode_ops; | 206 | tmp_inode->i_op = &cifs_file_inode_ops; |
@@ -404,9 +404,9 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
404 | if(pTcon == NULL) | 404 | if(pTcon == NULL) |
405 | return -EINVAL; | 405 | return -EINVAL; |
406 | 406 | ||
407 | down(&file->f_dentry->d_sb->s_vfs_rename_sem); | 407 | mutex_lock(&file->f_dentry->d_sb->s_vfs_rename_mutex); |
408 | full_path = build_path_from_dentry(file->f_dentry); | 408 | full_path = build_path_from_dentry(file->f_dentry); |
409 | up(&file->f_dentry->d_sb->s_vfs_rename_sem); | 409 | mutex_unlock(&file->f_dentry->d_sb->s_vfs_rename_mutex); |
410 | 410 | ||
411 | if(full_path == NULL) { | 411 | if(full_path == NULL) { |
412 | return -ENOMEM; | 412 | return -ENOMEM; |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 777e3363c2a4..3938444d87b2 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -62,9 +62,9 @@ int cifs_removexattr(struct dentry * direntry, const char * ea_name) | |||
62 | cifs_sb = CIFS_SB(sb); | 62 | cifs_sb = CIFS_SB(sb); |
63 | pTcon = cifs_sb->tcon; | 63 | pTcon = cifs_sb->tcon; |
64 | 64 | ||
65 | down(&sb->s_vfs_rename_sem); | 65 | mutex_lock(&sb->s_vfs_rename_mutex); |
66 | full_path = build_path_from_dentry(direntry); | 66 | full_path = build_path_from_dentry(direntry); |
67 | up(&sb->s_vfs_rename_sem); | 67 | mutex_unlock(&sb->s_vfs_rename_mutex); |
68 | if(full_path == NULL) { | 68 | if(full_path == NULL) { |
69 | FreeXid(xid); | 69 | FreeXid(xid); |
70 | return -ENOMEM; | 70 | return -ENOMEM; |
@@ -116,9 +116,9 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
116 | cifs_sb = CIFS_SB(sb); | 116 | cifs_sb = CIFS_SB(sb); |
117 | pTcon = cifs_sb->tcon; | 117 | pTcon = cifs_sb->tcon; |
118 | 118 | ||
119 | down(&sb->s_vfs_rename_sem); | 119 | mutex_lock(&sb->s_vfs_rename_mutex); |
120 | full_path = build_path_from_dentry(direntry); | 120 | full_path = build_path_from_dentry(direntry); |
121 | up(&sb->s_vfs_rename_sem); | 121 | mutex_unlock(&sb->s_vfs_rename_mutex); |
122 | if(full_path == NULL) { | 122 | if(full_path == NULL) { |
123 | FreeXid(xid); | 123 | FreeXid(xid); |
124 | return -ENOMEM; | 124 | return -ENOMEM; |
@@ -223,9 +223,9 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | |||
223 | cifs_sb = CIFS_SB(sb); | 223 | cifs_sb = CIFS_SB(sb); |
224 | pTcon = cifs_sb->tcon; | 224 | pTcon = cifs_sb->tcon; |
225 | 225 | ||
226 | down(&sb->s_vfs_rename_sem); | 226 | mutex_lock(&sb->s_vfs_rename_mutex); |
227 | full_path = build_path_from_dentry(direntry); | 227 | full_path = build_path_from_dentry(direntry); |
228 | up(&sb->s_vfs_rename_sem); | 228 | mutex_unlock(&sb->s_vfs_rename_mutex); |
229 | if(full_path == NULL) { | 229 | if(full_path == NULL) { |
230 | FreeXid(xid); | 230 | FreeXid(xid); |
231 | return -ENOMEM; | 231 | return -ENOMEM; |
@@ -341,9 +341,9 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * data, size_t buf_size) | |||
341 | cifs_sb = CIFS_SB(sb); | 341 | cifs_sb = CIFS_SB(sb); |
342 | pTcon = cifs_sb->tcon; | 342 | pTcon = cifs_sb->tcon; |
343 | 343 | ||
344 | down(&sb->s_vfs_rename_sem); | 344 | mutex_lock(&sb->s_vfs_rename_mutex); |
345 | full_path = build_path_from_dentry(direntry); | 345 | full_path = build_path_from_dentry(direntry); |
346 | up(&sb->s_vfs_rename_sem); | 346 | mutex_unlock(&sb->s_vfs_rename_mutex); |
347 | if(full_path == NULL) { | 347 | if(full_path == NULL) { |
348 | FreeXid(xid); | 348 | FreeXid(xid); |
349 | return -ENOMEM; | 349 | return -ENOMEM; |