aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-08-10 12:15:13 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-08-10 12:15:13 -0400
commit2d610b80e954045ccfc27558f84e482709e5e5b7 (patch)
tree840b3bb52adba07b6f1e4ddf2beb5ad5df480486 /fs
parent8a9cd6d676728792aaee31f30015d284acd154a3 (diff)
parent86b3786078d63242d3194ffc58ae8dae1d1bbef3 (diff)
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/bio.c8
-rw-r--r--fs/dcache.c7
-rw-r--r--fs/isofs/compress.c6
-rw-r--r--fs/namei.c8
-rw-r--r--fs/namespace.c2
5 files changed, 16 insertions, 15 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 249dd6bb66c8..1f2d4649b188 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -248,17 +248,13 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src)
248{ 248{
249 request_queue_t *q = bdev_get_queue(bio_src->bi_bdev); 249 request_queue_t *q = bdev_get_queue(bio_src->bi_bdev);
250 250
251 memcpy(bio->bi_io_vec, bio_src->bi_io_vec, bio_src->bi_max_vecs * sizeof(struct bio_vec)); 251 memcpy(bio->bi_io_vec, bio_src->bi_io_vec,
252 bio_src->bi_max_vecs * sizeof(struct bio_vec));
252 253
253 bio->bi_sector = bio_src->bi_sector; 254 bio->bi_sector = bio_src->bi_sector;
254 bio->bi_bdev = bio_src->bi_bdev; 255 bio->bi_bdev = bio_src->bi_bdev;
255 bio->bi_flags |= 1 << BIO_CLONED; 256 bio->bi_flags |= 1 << BIO_CLONED;
256 bio->bi_rw = bio_src->bi_rw; 257 bio->bi_rw = bio_src->bi_rw;
257
258 /*
259 * notes -- maybe just leave bi_idx alone. assume identical mapping
260 * for the clone
261 */
262 bio->bi_vcnt = bio_src->bi_vcnt; 258 bio->bi_vcnt = bio_src->bi_vcnt;
263 bio->bi_size = bio_src->bi_size; 259 bio->bi_size = bio_src->bi_size;
264 bio->bi_idx = bio_src->bi_idx; 260 bio->bi_idx = bio_src->bi_idx;
diff --git a/fs/dcache.c b/fs/dcache.c
index 3aa8a7e980d8..a15a2e1f5520 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -19,6 +19,7 @@
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/mm.h> 20#include <linux/mm.h>
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/fsnotify.h>
22#include <linux/slab.h> 23#include <linux/slab.h>
23#include <linux/init.h> 24#include <linux/init.h>
24#include <linux/smp_lock.h> 25#include <linux/smp_lock.h>
@@ -101,6 +102,7 @@ static inline void dentry_iput(struct dentry * dentry)
101 list_del_init(&dentry->d_alias); 102 list_del_init(&dentry->d_alias);
102 spin_unlock(&dentry->d_lock); 103 spin_unlock(&dentry->d_lock);
103 spin_unlock(&dcache_lock); 104 spin_unlock(&dcache_lock);
105 fsnotify_inoderemove(inode);
104 if (dentry->d_op && dentry->d_op->d_iput) 106 if (dentry->d_op && dentry->d_op->d_iput)
105 dentry->d_op->d_iput(dentry, inode); 107 dentry->d_op->d_iput(dentry, inode);
106 else 108 else
@@ -1165,13 +1167,16 @@ out:
1165 1167
1166void d_delete(struct dentry * dentry) 1168void d_delete(struct dentry * dentry)
1167{ 1169{
1170 int isdir = 0;
1168 /* 1171 /*
1169 * Are we the only user? 1172 * Are we the only user?
1170 */ 1173 */
1171 spin_lock(&dcache_lock); 1174 spin_lock(&dcache_lock);
1172 spin_lock(&dentry->d_lock); 1175 spin_lock(&dentry->d_lock);
1176 isdir = S_ISDIR(dentry->d_inode->i_mode);
1173 if (atomic_read(&dentry->d_count) == 1) { 1177 if (atomic_read(&dentry->d_count) == 1) {
1174 dentry_iput(dentry); 1178 dentry_iput(dentry);
1179 fsnotify_nameremove(dentry, isdir);
1175 return; 1180 return;
1176 } 1181 }
1177 1182
@@ -1180,6 +1185,8 @@ void d_delete(struct dentry * dentry)
1180 1185
1181 spin_unlock(&dentry->d_lock); 1186 spin_unlock(&dentry->d_lock);
1182 spin_unlock(&dcache_lock); 1187 spin_unlock(&dcache_lock);
1188
1189 fsnotify_nameremove(dentry, isdir);
1183} 1190}
1184 1191
1185static void __d_rehash(struct dentry * entry, struct hlist_head *list) 1192static void __d_rehash(struct dentry * entry, struct hlist_head *list)
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index 34a44e451689..4917315db732 100644
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -129,8 +129,14 @@ static int zisofs_readpage(struct file *file, struct page *page)
129 cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask))); 129 cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask)));
130 brelse(bh); 130 brelse(bh);
131 131
132 if (cstart > cend)
133 goto eio;
134
132 csize = cend-cstart; 135 csize = cend-cstart;
133 136
137 if (csize > deflateBound(1UL << zisofs_block_shift))
138 goto eio;
139
134 /* Now page[] contains an array of pages, any of which can be NULL, 140 /* Now page[] contains an array of pages, any of which can be NULL,
135 and the locks on which we hold. We should now read the data and 141 and the locks on which we hold. We should now read the data and
136 release the pages. If the pages are NULL the decompressed data 142 release the pages. If the pages are NULL the decompressed data
diff --git a/fs/namei.c b/fs/namei.c
index 83559dce4286..57046d98a746 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1802,7 +1802,6 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
1802 up(&dentry->d_inode->i_sem); 1802 up(&dentry->d_inode->i_sem);
1803 if (!error) { 1803 if (!error) {
1804 d_delete(dentry); 1804 d_delete(dentry);
1805 fsnotify_rmdir(dentry, dentry->d_inode, dir);
1806 } 1805 }
1807 dput(dentry); 1806 dput(dentry);
1808 1807
@@ -1874,14 +1873,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
1874 1873
1875 /* We don't d_delete() NFS sillyrenamed files--they still exist. */ 1874 /* We don't d_delete() NFS sillyrenamed files--they still exist. */
1876 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) { 1875 if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
1877#if defined(CONFIG_INOTIFY) || defined(CONFIG_DNOTIFY)
1878 dget(dentry);
1879 d_delete(dentry); 1876 d_delete(dentry);
1880 fsnotify_unlink(dentry, dir);
1881 dput(dentry);
1882#else
1883 d_delete(dentry);
1884#endif
1885 } 1877 }
1886 1878
1887 return error; 1879 return error;
diff --git a/fs/namespace.c b/fs/namespace.c
index 587eb0d707ee..79bd8a46e1e7 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -160,7 +160,7 @@ clone_mnt(struct vfsmount *old, struct dentry *root)
160 mnt->mnt_root = dget(root); 160 mnt->mnt_root = dget(root);
161 mnt->mnt_mountpoint = mnt->mnt_root; 161 mnt->mnt_mountpoint = mnt->mnt_root;
162 mnt->mnt_parent = mnt; 162 mnt->mnt_parent = mnt;
163 mnt->mnt_namespace = old->mnt_namespace; 163 mnt->mnt_namespace = current->namespace;
164 164
165 /* stick the duplicate mount on the same expiry list 165 /* stick the duplicate mount on the same expiry list
166 * as the original if that was on one */ 166 * as the original if that was on one */