aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/README6
-rw-r--r--fs/cifs/cifsfs.c43
-rw-r--r--fs/cifs/connect.c27
-rw-r--r--fs/cifs/file.c1
-rw-r--r--fs/cifs/inode.c15
-rw-r--r--fs/cifs/ioctl.c7
-rw-r--r--fs/cifs/readdir.c5
-rw-r--r--fs/cifs/sess.c6
8 files changed, 40 insertions, 70 deletions
diff --git a/fs/cifs/README b/fs/cifs/README
index 5f0e1bd64fee..432e515431c4 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -269,7 +269,7 @@ A partial list of the supported mount options follows:
269 (gid) mount option is specified. For the uid (gid) of newly 269 (gid) mount option is specified. For the uid (gid) of newly
270 created files and directories, ie files created since 270 created files and directories, ie files created since
271 the last mount of the server share, the expected uid 271 the last mount of the server share, the expected uid
272 (gid) is cached as as long as the inode remains in 272 (gid) is cached as long as the inode remains in
273 memory on the client. Also note that permission 273 memory on the client. Also note that permission
274 checks (authorization checks) on accesses to a file occur 274 checks (authorization checks) on accesses to a file occur
275 at the server, but there are cases in which an administrator 275 at the server, but there are cases in which an administrator
@@ -375,7 +375,7 @@ A partial list of the supported mount options follows:
375 the local process on newly created files, directories, and 375 the local process on newly created files, directories, and
376 devices (create, mkdir, mknod). If the CIFS Unix Extensions 376 devices (create, mkdir, mknod). If the CIFS Unix Extensions
377 are not negotiated, for newly created files and directories 377 are not negotiated, for newly created files and directories
378 instead of using the default uid and gid specified on the 378 instead of using the default uid and gid specified on
379 the mount, cache the new file's uid and gid locally which means 379 the mount, cache the new file's uid and gid locally which means
380 that the uid for the file can change when the inode is 380 that the uid for the file can change when the inode is
381 reloaded (or the user remounts the share). 381 reloaded (or the user remounts the share).
@@ -440,7 +440,7 @@ A partial list of the supported mount options follows:
440 create device files and fifos in a format compatible with 440 create device files and fifos in a format compatible with
441 Services for Unix (SFU). In addition retrieve bits 10-12 441 Services for Unix (SFU). In addition retrieve bits 10-12
442 of the mode via the SETFILEBITS extended attribute (as 442 of the mode via the SETFILEBITS extended attribute (as
443 SFU does). In the future the bottom 9 bits of the mode 443 SFU does). In the future the bottom 9 bits of the
444 mode also will be emulated using queries of the security 444 mode also will be emulated using queries of the security
445 descriptor (ACL). 445 descriptor (ACL).
446 sign Must use packet signing (helps avoid unwanted data modification 446 sign Must use packet signing (helps avoid unwanted data modification
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 43364361276e..84976cdbe713 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -256,7 +256,6 @@ cifs_alloc_inode(struct super_block *sb)
256 file data or metadata */ 256 file data or metadata */
257 cifs_inode->clientCanCacheRead = FALSE; 257 cifs_inode->clientCanCacheRead = FALSE;
258 cifs_inode->clientCanCacheAll = FALSE; 258 cifs_inode->clientCanCacheAll = FALSE;
259 cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
260 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ 259 cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
261 cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME; 260 cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;
262 INIT_LIST_HEAD(&cifs_inode->openFileList); 261 INIT_LIST_HEAD(&cifs_inode->openFileList);
@@ -495,25 +494,13 @@ cifs_get_sb(struct file_system_type *fs_type,
495 return simple_set_mnt(mnt, sb); 494 return simple_set_mnt(mnt, sb);
496} 495}
497 496
498static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov, 497static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
499 unsigned long nr_segs, loff_t *ppos) 498 unsigned long nr_segs, loff_t pos)
500{
501 struct inode *inode = file->f_dentry->d_inode;
502 ssize_t written;
503
504 written = generic_file_writev(file, iov, nr_segs, ppos);
505 if (!CIFS_I(inode)->clientCanCacheAll)
506 filemap_fdatawrite(inode->i_mapping);
507 return written;
508}
509
510static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
511 size_t count, loff_t pos)
512{ 499{
513 struct inode *inode = iocb->ki_filp->f_dentry->d_inode; 500 struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
514 ssize_t written; 501 ssize_t written;
515 502
516 written = generic_file_aio_write(iocb, buf, count, pos); 503 written = generic_file_aio_write(iocb, iov, nr_segs, pos);
517 if (!CIFS_I(inode)->clientCanCacheAll) 504 if (!CIFS_I(inode)->clientCanCacheAll)
518 filemap_fdatawrite(inode->i_mapping); 505 filemap_fdatawrite(inode->i_mapping);
519 return written; 506 return written;
@@ -592,8 +579,6 @@ struct inode_operations cifs_symlink_inode_ops = {
592const struct file_operations cifs_file_ops = { 579const struct file_operations cifs_file_ops = {
593 .read = do_sync_read, 580 .read = do_sync_read,
594 .write = do_sync_write, 581 .write = do_sync_write,
595 .readv = generic_file_readv,
596 .writev = cifs_file_writev,
597 .aio_read = generic_file_aio_read, 582 .aio_read = generic_file_aio_read,
598 .aio_write = cifs_file_aio_write, 583 .aio_write = cifs_file_aio_write,
599 .open = cifs_open, 584 .open = cifs_open,
@@ -635,8 +620,6 @@ const struct file_operations cifs_file_direct_ops = {
635const struct file_operations cifs_file_nobrl_ops = { 620const struct file_operations cifs_file_nobrl_ops = {
636 .read = do_sync_read, 621 .read = do_sync_read,
637 .write = do_sync_write, 622 .write = do_sync_write,
638 .readv = generic_file_readv,
639 .writev = cifs_file_writev,
640 .aio_read = generic_file_aio_read, 623 .aio_read = generic_file_aio_read,
641 .aio_write = cifs_file_aio_write, 624 .aio_write = cifs_file_aio_write,
642 .open = cifs_open, 625 .open = cifs_open,
@@ -713,8 +696,7 @@ cifs_init_inodecache(void)
713static void 696static void
714cifs_destroy_inodecache(void) 697cifs_destroy_inodecache(void)
715{ 698{
716 if (kmem_cache_destroy(cifs_inode_cachep)) 699 kmem_cache_destroy(cifs_inode_cachep);
717 printk(KERN_WARNING "cifs_inode_cache: error freeing\n");
718} 700}
719 701
720static int 702static int
@@ -792,13 +774,9 @@ static void
792cifs_destroy_request_bufs(void) 774cifs_destroy_request_bufs(void)
793{ 775{
794 mempool_destroy(cifs_req_poolp); 776 mempool_destroy(cifs_req_poolp);
795 if (kmem_cache_destroy(cifs_req_cachep)) 777 kmem_cache_destroy(cifs_req_cachep);
796 printk(KERN_WARNING
797 "cifs_destroy_request_cache: error not all structures were freed\n");
798 mempool_destroy(cifs_sm_req_poolp); 778 mempool_destroy(cifs_sm_req_poolp);
799 if (kmem_cache_destroy(cifs_sm_req_cachep)) 779 kmem_cache_destroy(cifs_sm_req_cachep);
800 printk(KERN_WARNING
801 "cifs_destroy_request_cache: cifs_small_rq free error\n");
802} 780}
803 781
804static int 782static int
@@ -833,13 +811,8 @@ static void
833cifs_destroy_mids(void) 811cifs_destroy_mids(void)
834{ 812{
835 mempool_destroy(cifs_mid_poolp); 813 mempool_destroy(cifs_mid_poolp);
836 if (kmem_cache_destroy(cifs_mid_cachep)) 814 kmem_cache_destroy(cifs_mid_cachep);
837 printk(KERN_WARNING 815 kmem_cache_destroy(cifs_oplock_cachep);
838 "cifs_destroy_mids: error not all structures were freed\n");
839
840 if (kmem_cache_destroy(cifs_oplock_cachep))
841 printk(KERN_WARNING
842 "error not all oplock structures were freed\n");
843} 816}
844 817
845static int cifs_oplock_thread(void * dummyarg) 818static int cifs_oplock_thread(void * dummyarg)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1d17691086c2..4093d5332930 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -771,16 +771,17 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
771 separator[0] = ','; 771 separator[0] = ',';
772 separator[1] = 0; 772 separator[1] = 0;
773 773
774 if(Local_System_Name[0] != 0) 774 if (Local_System_Name[0] != 0)
775 memcpy(vol->source_rfc1001_name, Local_System_Name,15); 775 memcpy(vol->source_rfc1001_name, Local_System_Name,15);
776 else { 776 else {
777 char *nodename = utsname()->nodename;
778 int n = strnlen(nodename,15);
777 memset(vol->source_rfc1001_name,0x20,15); 779 memset(vol->source_rfc1001_name,0x20,15);
778 for(i=0;i < strnlen(system_utsname.nodename,15);i++) { 780 for(i=0 ; i < n ; i++) {
779 /* does not have to be perfect mapping since field is 781 /* does not have to be perfect mapping since field is
780 informational, only used for servers that do not support 782 informational, only used for servers that do not support
781 port 445 and it can be overridden at mount time */ 783 port 445 and it can be overridden at mount time */
782 vol->source_rfc1001_name[i] = 784 vol->source_rfc1001_name[i] = toupper(nodename[i]);
783 toupper(system_utsname.nodename[i]);
784 } 785 }
785 } 786 }
786 vol->source_rfc1001_name[15] = 0; 787 vol->source_rfc1001_name[15] = 0;
@@ -2157,7 +2158,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2157 32, nls_codepage); 2158 32, nls_codepage);
2158 bcc_ptr += 2 * bytes_returned; 2159 bcc_ptr += 2 * bytes_returned;
2159 bytes_returned = 2160 bytes_returned =
2160 cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 2161 cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release,
2161 32, nls_codepage); 2162 32, nls_codepage);
2162 bcc_ptr += 2 * bytes_returned; 2163 bcc_ptr += 2 * bytes_returned;
2163 bcc_ptr += 2; 2164 bcc_ptr += 2;
@@ -2184,8 +2185,8 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2184 } 2185 }
2185 strcpy(bcc_ptr, "Linux version "); 2186 strcpy(bcc_ptr, "Linux version ");
2186 bcc_ptr += strlen("Linux version "); 2187 bcc_ptr += strlen("Linux version ");
2187 strcpy(bcc_ptr, system_utsname.release); 2188 strcpy(bcc_ptr, utsname()->release);
2188 bcc_ptr += strlen(system_utsname.release) + 1; 2189 bcc_ptr += strlen(utsname()->release) + 1;
2189 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); 2190 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
2190 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; 2191 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;
2191 } 2192 }
@@ -2449,7 +2450,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
2449 32, nls_codepage); 2450 32, nls_codepage);
2450 bcc_ptr += 2 * bytes_returned; 2451 bcc_ptr += 2 * bytes_returned;
2451 bytes_returned = 2452 bytes_returned =
2452 cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 32, 2453 cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, 32,
2453 nls_codepage); 2454 nls_codepage);
2454 bcc_ptr += 2 * bytes_returned; 2455 bcc_ptr += 2 * bytes_returned;
2455 bcc_ptr += 2; /* null terminate Linux version */ 2456 bcc_ptr += 2; /* null terminate Linux version */
@@ -2466,8 +2467,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
2466 } else { /* ASCII */ 2467 } else { /* ASCII */
2467 strcpy(bcc_ptr, "Linux version "); 2468 strcpy(bcc_ptr, "Linux version ");
2468 bcc_ptr += strlen("Linux version "); 2469 bcc_ptr += strlen("Linux version ");
2469 strcpy(bcc_ptr, system_utsname.release); 2470 strcpy(bcc_ptr, utsname()->release);
2470 bcc_ptr += strlen(system_utsname.release) + 1; 2471 bcc_ptr += strlen(utsname()->release) + 1;
2471 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); 2472 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
2472 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; 2473 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;
2473 bcc_ptr++; /* empty domain field */ 2474 bcc_ptr++; /* empty domain field */
@@ -2840,7 +2841,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2840 32, nls_codepage); 2841 32, nls_codepage);
2841 bcc_ptr += 2 * bytes_returned; 2842 bcc_ptr += 2 * bytes_returned;
2842 bytes_returned = 2843 bytes_returned =
2843 cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 32, 2844 cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, 32,
2844 nls_codepage); 2845 nls_codepage);
2845 bcc_ptr += 2 * bytes_returned; 2846 bcc_ptr += 2 * bytes_returned;
2846 bcc_ptr += 2; /* null term version string */ 2847 bcc_ptr += 2; /* null term version string */
@@ -2892,8 +2893,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2892 2893
2893 strcpy(bcc_ptr, "Linux version "); 2894 strcpy(bcc_ptr, "Linux version ");
2894 bcc_ptr += strlen("Linux version "); 2895 bcc_ptr += strlen("Linux version ");
2895 strcpy(bcc_ptr, system_utsname.release); 2896 strcpy(bcc_ptr, utsname()->release);
2896 bcc_ptr += strlen(system_utsname.release) + 1; 2897 bcc_ptr += strlen(utsname()->release) + 1;
2897 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); 2898 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
2898 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; 2899 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;
2899 bcc_ptr++; /* null domain */ 2900 bcc_ptr++; /* null domain */
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ddb012a68023..976a691c5a68 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -25,7 +25,6 @@
25#include <linux/backing-dev.h> 25#include <linux/backing-dev.h>
26#include <linux/stat.h> 26#include <linux/stat.h>
27#include <linux/fcntl.h> 27#include <linux/fcntl.h>
28#include <linux/mpage.h>
29#include <linux/pagemap.h> 28#include <linux/pagemap.h>
30#include <linux/pagevec.h> 29#include <linux/pagevec.h>
31#include <linux/smp_lock.h> 30#include <linux/smp_lock.h>
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index fe6d21f99964..35d54bb0869a 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/buffer_head.h>
23#include <linux/stat.h> 22#include <linux/stat.h>
24#include <linux/pagemap.h> 23#include <linux/pagemap.h>
25#include <asm/div64.h> 24#include <asm/div64.h>
@@ -597,7 +596,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
597 596
598 if (!rc) { 597 if (!rc) {
599 if (direntry->d_inode) 598 if (direntry->d_inode)
600 direntry->d_inode->i_nlink--; 599 drop_nlink(direntry->d_inode);
601 } else if (rc == -ENOENT) { 600 } else if (rc == -ENOENT) {
602 d_drop(direntry); 601 d_drop(direntry);
603 } else if (rc == -ETXTBSY) { 602 } else if (rc == -ETXTBSY) {
@@ -616,7 +615,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
616 CIFS_MOUNT_MAP_SPECIAL_CHR); 615 CIFS_MOUNT_MAP_SPECIAL_CHR);
617 CIFSSMBClose(xid, pTcon, netfid); 616 CIFSSMBClose(xid, pTcon, netfid);
618 if (direntry->d_inode) 617 if (direntry->d_inode)
619 direntry->d_inode->i_nlink--; 618 drop_nlink(direntry->d_inode);
620 } 619 }
621 } else if (rc == -EACCES) { 620 } else if (rc == -EACCES) {
622 /* try only if r/o attribute set in local lookup data? */ 621 /* try only if r/o attribute set in local lookup data? */
@@ -670,7 +669,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
670 CIFS_MOUNT_MAP_SPECIAL_CHR); 669 CIFS_MOUNT_MAP_SPECIAL_CHR);
671 if (!rc) { 670 if (!rc) {
672 if (direntry->d_inode) 671 if (direntry->d_inode)
673 direntry->d_inode->i_nlink--; 672 drop_nlink(direntry->d_inode);
674 } else if (rc == -ETXTBSY) { 673 } else if (rc == -ETXTBSY) {
675 int oplock = FALSE; 674 int oplock = FALSE;
676 __u16 netfid; 675 __u16 netfid;
@@ -691,7 +690,7 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
691 CIFS_MOUNT_MAP_SPECIAL_CHR); 690 CIFS_MOUNT_MAP_SPECIAL_CHR);
692 CIFSSMBClose(xid, pTcon, netfid); 691 CIFSSMBClose(xid, pTcon, netfid);
693 if (direntry->d_inode) 692 if (direntry->d_inode)
694 direntry->d_inode->i_nlink--; 693 drop_nlink(direntry->d_inode);
695 } 694 }
696 /* BB if rc = -ETXTBUSY goto the rename logic BB */ 695 /* BB if rc = -ETXTBUSY goto the rename logic BB */
697 } 696 }
@@ -742,7 +741,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
742 cFYI(1, ("cifs_mkdir returned 0x%x", rc)); 741 cFYI(1, ("cifs_mkdir returned 0x%x", rc));
743 d_drop(direntry); 742 d_drop(direntry);
744 } else { 743 } else {
745 inode->i_nlink++; 744 inc_nlink(inode);
746 if (pTcon->ses->capabilities & CAP_UNIX) 745 if (pTcon->ses->capabilities & CAP_UNIX)
747 rc = cifs_get_inode_info_unix(&newinode, full_path, 746 rc = cifs_get_inode_info_unix(&newinode, full_path,
748 inode->i_sb,xid); 747 inode->i_sb,xid);
@@ -823,9 +822,9 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
823 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 822 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
824 823
825 if (!rc) { 824 if (!rc) {
826 inode->i_nlink--; 825 drop_nlink(inode);
827 i_size_write(direntry->d_inode,0); 826 i_size_write(direntry->d_inode,0);
828 direntry->d_inode->i_nlink = 0; 827 clear_nlink(direntry->d_inode);
829 } 828 }
830 829
831 cifsInode = CIFS_I(direntry->d_inode); 830 cifsInode = CIFS_I(direntry->d_inode);
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index b0ea6687ab55..e34c7db00f6f 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -22,7 +22,6 @@
22 */ 22 */
23 23
24#include <linux/fs.h> 24#include <linux/fs.h>
25#include <linux/ext2_fs.h>
26#include "cifspdu.h" 25#include "cifspdu.h"
27#include "cifsglob.h" 26#include "cifsglob.h"
28#include "cifsproto.h" 27#include "cifsproto.h"
@@ -74,7 +73,7 @@ int cifs_ioctl (struct inode * inode, struct file * filep,
74 } 73 }
75 break; 74 break;
76#ifdef CONFIG_CIFS_POSIX 75#ifdef CONFIG_CIFS_POSIX
77 case EXT2_IOC_GETFLAGS: 76 case FS_IOC_GETFLAGS:
78 if(CIFS_UNIX_EXTATTR_CAP & caps) { 77 if(CIFS_UNIX_EXTATTR_CAP & caps) {
79 if (pSMBFile == NULL) 78 if (pSMBFile == NULL)
80 break; 79 break;
@@ -82,12 +81,12 @@ int cifs_ioctl (struct inode * inode, struct file * filep,
82 &ExtAttrBits, &ExtAttrMask); 81 &ExtAttrBits, &ExtAttrMask);
83 if(rc == 0) 82 if(rc == 0)
84 rc = put_user(ExtAttrBits & 83 rc = put_user(ExtAttrBits &
85 EXT2_FL_USER_VISIBLE, 84 FS_FL_USER_VISIBLE,
86 (int __user *)arg); 85 (int __user *)arg);
87 } 86 }
88 break; 87 break;
89 88
90 case EXT2_IOC_SETFLAGS: 89 case FS_IOC_SETFLAGS:
91 if(CIFS_UNIX_EXTATTR_CAP & caps) { 90 if(CIFS_UNIX_EXTATTR_CAP & caps) {
92 if(get_user(ExtAttrBits,(int __user *)arg)) { 91 if(get_user(ExtAttrBits,(int __user *)arg)) {
93 rc = -EFAULT; 92 rc = -EFAULT;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index acbabc09543f..b5b0a2a41bef 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -234,10 +234,9 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
234 234
235 if (allocation_size < end_of_file) 235 if (allocation_size < end_of_file)
236 cFYI(1, ("May be sparse file, allocation less than file size")); 236 cFYI(1, ("May be sparse file, allocation less than file size"));
237 cFYI(1, ("File Size %ld and blocks %llu and blocksize %ld", 237 cFYI(1, ("File Size %ld and blocks %llu",
238 (unsigned long)tmp_inode->i_size, 238 (unsigned long)tmp_inode->i_size,
239 (unsigned long long)tmp_inode->i_blocks, 239 (unsigned long long)tmp_inode->i_blocks));
240 tmp_inode->i_blksize));
241 if (S_ISREG(tmp_inode->i_mode)) { 240 if (S_ISREG(tmp_inode->i_mode)) {
242 cFYI(1, ("File inode")); 241 cFYI(1, ("File inode"));
243 tmp_inode->i_op = &cifs_file_inode_ops; 242 tmp_inode->i_op = &cifs_file_inode_ops;
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index e4c4e466e320..a8a083543ba0 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -111,7 +111,7 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
111 bytes_ret = cifs_strtoUCS((__le16 *)bcc_ptr, "Linux version ", 32, 111 bytes_ret = cifs_strtoUCS((__le16 *)bcc_ptr, "Linux version ", 32,
112 nls_cp); 112 nls_cp);
113 bcc_ptr += 2 * bytes_ret; 113 bcc_ptr += 2 * bytes_ret;
114 bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, system_utsname.release, 114 bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, init_utsname()->release,
115 32, nls_cp); 115 32, nls_cp);
116 bcc_ptr += 2 * bytes_ret; 116 bcc_ptr += 2 * bytes_ret;
117 bcc_ptr += 2; /* trailing null */ 117 bcc_ptr += 2; /* trailing null */
@@ -158,8 +158,8 @@ static void ascii_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
158 158
159 strcpy(bcc_ptr, "Linux version "); 159 strcpy(bcc_ptr, "Linux version ");
160 bcc_ptr += strlen("Linux version "); 160 bcc_ptr += strlen("Linux version ");
161 strcpy(bcc_ptr, system_utsname.release); 161 strcpy(bcc_ptr, init_utsname()->release);
162 bcc_ptr += strlen(system_utsname.release) + 1; 162 bcc_ptr += strlen(init_utsname()->release) + 1;
163 163
164 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); 164 strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
165 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; 165 bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;