aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-02-22 18:38:53 -0500
committerSteve French <sfrench@us.ibm.com>2006-02-22 18:38:53 -0500
commit5d2f248a5f3acac4b763439327c92091be7abb1c (patch)
tree8f30098a6d17c0367adfbb780e5a8d9a5c43ad5a /fs
parenta048d7a8704b35ff6372fdf5eedd4533f37b1885 (diff)
parent9e956c2dac9bec602ed1ba29181b45ba6d2b6448 (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')
-rw-r--r--fs/9p/v9fs.c2
-rw-r--r--fs/cifs/cifssmb.c7
-rw-r--r--fs/cifs/connect.c8
-rw-r--r--fs/proc/inode.c4
-rw-r--r--fs/proc/root.c17
-rw-r--r--fs/super.c15
6 files changed, 32 insertions, 21 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 5250c428fc1f..ef3386549140 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -66,7 +66,7 @@ static match_table_t tokens = {
66 {Opt_afid, "afid=%u"}, 66 {Opt_afid, "afid=%u"},
67 {Opt_rfdno, "rfdno=%u"}, 67 {Opt_rfdno, "rfdno=%u"},
68 {Opt_wfdno, "wfdno=%u"}, 68 {Opt_wfdno, "wfdno=%u"},
69 {Opt_debug, "debug=%u"}, 69 {Opt_debug, "debug=%x"},
70 {Opt_name, "name=%s"}, 70 {Opt_name, "name=%s"},
71 {Opt_remotename, "aname=%s"}, 71 {Opt_remotename, "aname=%s"},
72 {Opt_unix, "proto=unix"}, 72 {Opt_unix, "proto=unix"},
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 38ab9f67c5f4..9d7bbd225eff 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1076,13 +1076,14 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
1076 cifs_small_buf_release(iov[0].iov_base); 1076 cifs_small_buf_release(iov[0].iov_base);
1077 else if(resp_buf_type == CIFS_LARGE_BUFFER) 1077 else if(resp_buf_type == CIFS_LARGE_BUFFER)
1078 cifs_buf_release(iov[0].iov_base); 1078 cifs_buf_release(iov[0].iov_base);
1079 } else /* return buffer to caller to free */ /* BB FIXME how do we tell caller if it is not a large buffer */ { 1079 } else if(resp_buf_type != CIFS_NO_BUFFER) {
1080 *buf = iov[0].iov_base; 1080 /* return buffer to caller to free */
1081 *buf = iov[0].iov_base;
1081 if(resp_buf_type == CIFS_SMALL_BUFFER) 1082 if(resp_buf_type == CIFS_SMALL_BUFFER)
1082 *pbuf_type = CIFS_SMALL_BUFFER; 1083 *pbuf_type = CIFS_SMALL_BUFFER;
1083 else if(resp_buf_type == CIFS_LARGE_BUFFER) 1084 else if(resp_buf_type == CIFS_LARGE_BUFFER)
1084 *pbuf_type = CIFS_LARGE_BUFFER; 1085 *pbuf_type = CIFS_LARGE_BUFFER;
1085 } 1086 } /* else no valid buffer on return - leave as null */
1086 1087
1087 /* Note: On -EAGAIN error only caller can retry on handle based calls 1088 /* Note: On -EAGAIN error only caller can retry on handle based calls
1088 since file handle passed in no longer valid */ 1089 since file handle passed in no longer valid */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 0e1560ac5ad7..16535b510a96 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1795,10 +1795,10 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1795 conjunction with 52K kvec constraint on arch with 4K 1795 conjunction with 52K kvec constraint on arch with 4K
1796 page size */ 1796 page size */
1797 1797
1798 if(cifs_sb->rsize < PAGE_CACHE_SIZE) { 1798 if(cifs_sb->rsize < 2048) {
1799 cifs_sb->rsize = PAGE_CACHE_SIZE; 1799 cifs_sb->rsize = 2048;
1800 /* Windows ME does this */ 1800 /* Windows ME may prefer this */
1801 cFYI(1,("Attempt to set readsize for mount to less than one page (4096)")); 1801 cFYI(1,("readsize set to minimum 2048"));
1802 } 1802 }
1803 cifs_sb->mnt_uid = volume_info.linux_uid; 1803 cifs_sb->mnt_uid = volume_info.linux_uid;
1804 cifs_sb->mnt_gid = volume_info.linux_gid; 1804 cifs_sb->mnt_gid = volume_info.linux_gid;
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6573f31f1fd9..075d3e945602 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -204,10 +204,6 @@ int proc_fill_super(struct super_block *s, void *data, int silent)
204 root_inode = proc_get_inode(s, PROC_ROOT_INO, &proc_root); 204 root_inode = proc_get_inode(s, PROC_ROOT_INO, &proc_root);
205 if (!root_inode) 205 if (!root_inode)
206 goto out_no_root; 206 goto out_no_root;
207 /*
208 * Fixup the root inode's nlink value
209 */
210 root_inode->i_nlink += nr_processes();
211 root_inode->i_uid = 0; 207 root_inode->i_uid = 0;
212 root_inode->i_gid = 0; 208 root_inode->i_gid = 0;
213 s->s_root = d_alloc_root(root_inode); 209 s->s_root = d_alloc_root(root_inode);
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 68896283c8ae..c3fd3611112f 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -80,16 +80,16 @@ void __init proc_root_init(void)
80 proc_bus = proc_mkdir("bus", NULL); 80 proc_bus = proc_mkdir("bus", NULL);
81} 81}
82 82
83static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) 83static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat
84)
84{ 85{
85 /* 86 generic_fillattr(dentry->d_inode, stat);
86 * nr_threads is actually protected by the tasklist_lock; 87 stat->nlink = proc_root.nlink + nr_processes();
87 * however, it's conventional to do reads, especially for 88 return 0;
88 * reporting, without any locking whatsoever. 89}
89 */
90 if (dir->i_ino == PROC_ROOT_INO) /* check for safety... */
91 dir->i_nlink = proc_root.nlink + nr_threads;
92 90
91static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd)
92{
93 if (!proc_lookup(dir, dentry, nd)) { 93 if (!proc_lookup(dir, dentry, nd)) {
94 return NULL; 94 return NULL;
95 } 95 }
@@ -134,6 +134,7 @@ static struct file_operations proc_root_operations = {
134 */ 134 */
135static struct inode_operations proc_root_inode_operations = { 135static struct inode_operations proc_root_inode_operations = {
136 .lookup = proc_root_lookup, 136 .lookup = proc_root_lookup,
137 .getattr = proc_root_getattr,
137}; 138};
138 139
139/* 140/*
diff --git a/fs/super.c b/fs/super.c
index 30294218fa63..e20b5580afd5 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -666,6 +666,16 @@ static int test_bdev_super(struct super_block *s, void *data)
666 return (void *)s->s_bdev == data; 666 return (void *)s->s_bdev == data;
667} 667}
668 668
669static void bdev_uevent(struct block_device *bdev, enum kobject_action action)
670{
671 if (bdev->bd_disk) {
672 if (bdev->bd_part)
673 kobject_uevent(&bdev->bd_part->kobj, action);
674 else
675 kobject_uevent(&bdev->bd_disk->kobj, action);
676 }
677}
678
669struct super_block *get_sb_bdev(struct file_system_type *fs_type, 679struct super_block *get_sb_bdev(struct file_system_type *fs_type,
670 int flags, const char *dev_name, void *data, 680 int flags, const char *dev_name, void *data,
671 int (*fill_super)(struct super_block *, void *, int)) 681 int (*fill_super)(struct super_block *, void *, int))
@@ -707,8 +717,10 @@ struct super_block *get_sb_bdev(struct file_system_type *fs_type,
707 up_write(&s->s_umount); 717 up_write(&s->s_umount);
708 deactivate_super(s); 718 deactivate_super(s);
709 s = ERR_PTR(error); 719 s = ERR_PTR(error);
710 } else 720 } else {
711 s->s_flags |= MS_ACTIVE; 721 s->s_flags |= MS_ACTIVE;
722 bdev_uevent(bdev, KOBJ_MOUNT);
723 }
712 } 724 }
713 725
714 return s; 726 return s;
@@ -724,6 +736,7 @@ void kill_block_super(struct super_block *sb)
724{ 736{
725 struct block_device *bdev = sb->s_bdev; 737 struct block_device *bdev = sb->s_bdev;
726 738
739 bdev_uevent(bdev, KOBJ_UMOUNT);
727 generic_shutdown_super(sb); 740 generic_shutdown_super(sb);
728 sync_blockdev(bdev); 741 sync_blockdev(bdev);
729 close_bdev_excl(bdev); 742 close_bdev_excl(bdev);