aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-08-10 08:05:35 -0700
committerSteve French <sfrench@us.ibm.com>2005-08-10 08:05:35 -0700
commita47fd3f5e3a3f970ac1b81643ac56737f97a1fea (patch)
tree09bafe2399f187898ddc6a74176893f0b7f28c6b /fs
parentef6724e32142c2d9ca252d423cacc435c142734e (diff)
parent86b3786078d63242d3194ffc58ae8dae1d1bbef3 (diff)
downloadlinux-a47fd3f5e3a3f970ac1b81643ac56737f97a1fea.tar.gz
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
french@hera:~/linux-2.6(0)$ cg-update l `/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/heads/master' -> `.git/refs/heads/origin' cp: cannot create link `.git/objects/info/packs': File exists progress: 213 objects, 646653 bytes, 77% done `/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/info/packs' -> `.git/objects/info/packs' progress: 983 objects, 2805763 bytes, 100% done cg-pull: objects pull failed
Diffstat (limited to 'fs')
-rw-r--r--fs/Kconfig11
-rw-r--r--fs/bio.c8
-rw-r--r--fs/dcache.c7
-rw-r--r--fs/isofs/compress.c6
-rw-r--r--fs/namei.c2
-rw-r--r--fs/namespace.c2
6 files changed, 23 insertions, 13 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index 5d0c4be43dba1f..e54be7058359e0 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -363,12 +363,15 @@ config INOTIFY
bool "Inotify file change notification support"
default y
---help---
- Say Y here to enable inotify support and the /dev/inotify character
- device. Inotify is a file change notification system and a
+ Say Y here to enable inotify support and the associated system
+ calls. Inotify is a file change notification system and a
replacement for dnotify. Inotify fixes numerous shortcomings in
dnotify and introduces several new features. It allows monitoring
- of both files and directories via a single open fd. Multiple file
- events are supported.
+ of both files and directories via a single open fd. Other features
+ include multiple file events, one-shot support, and unmount
+ notification.
+
+ For more information, see Documentation/filesystems/inotify.txt
If unsure, say Y.
diff --git a/fs/bio.c b/fs/bio.c
index 249dd6bb66c843..1f2d4649b18801 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -248,17 +248,13 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src)
{
request_queue_t *q = bdev_get_queue(bio_src->bi_bdev);
- memcpy(bio->bi_io_vec, bio_src->bi_io_vec, bio_src->bi_max_vecs * sizeof(struct bio_vec));
+ memcpy(bio->bi_io_vec, bio_src->bi_io_vec,
+ bio_src->bi_max_vecs * sizeof(struct bio_vec));
bio->bi_sector = bio_src->bi_sector;
bio->bi_bdev = bio_src->bi_bdev;
bio->bi_flags |= 1 << BIO_CLONED;
bio->bi_rw = bio_src->bi_rw;
-
- /*
- * notes -- maybe just leave bi_idx alone. assume identical mapping
- * for the clone
- */
bio->bi_vcnt = bio_src->bi_vcnt;
bio->bi_size = bio_src->bi_size;
bio->bi_idx = bio_src->bi_idx;
diff --git a/fs/dcache.c b/fs/dcache.c
index 3aa8a7e980d808..a15a2e1f552088 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -19,6 +19,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/fs.h>
+#include <linux/fsnotify.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
@@ -101,6 +102,7 @@ static inline void dentry_iput(struct dentry * dentry)
list_del_init(&dentry->d_alias);
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
+ fsnotify_inoderemove(inode);
if (dentry->d_op && dentry->d_op->d_iput)
dentry->d_op->d_iput(dentry, inode);
else
@@ -1165,13 +1167,16 @@ out:
void d_delete(struct dentry * dentry)
{
+ int isdir = 0;
/*
* Are we the only user?
*/
spin_lock(&dcache_lock);
spin_lock(&dentry->d_lock);
+ isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) {
dentry_iput(dentry);
+ fsnotify_nameremove(dentry, isdir);
return;
}
@@ -1180,6 +1185,8 @@ void d_delete(struct dentry * dentry)
spin_unlock(&dentry->d_lock);
spin_unlock(&dcache_lock);
+
+ fsnotify_nameremove(dentry, isdir);
}
static void __d_rehash(struct dentry * entry, struct hlist_head *list)
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index 34a44e451689af..4917315db732e8 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)
cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask)));
brelse(bh);
+ if (cstart > cend)
+ goto eio;
+
csize = cend-cstart;
+ if (csize > deflateBound(1UL << zisofs_block_shift))
+ goto eio;
+
/* Now page[] contains an array of pages, any of which can be NULL,
and the locks on which we hold. We should now read the data and
release the pages. If the pages are NULL the decompressed data
diff --git a/fs/namei.c b/fs/namei.c
index 4a27eb79811895..57046d98a746f0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1801,7 +1801,6 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
}
up(&dentry->d_inode->i_sem);
if (!error) {
- fsnotify_rmdir(dentry, dentry->d_inode, dir);
d_delete(dentry);
}
dput(dentry);
@@ -1874,7 +1873,6 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
/* We don't d_delete() NFS sillyrenamed files--they still exist. */
if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
- fsnotify_unlink(dentry, dir);
d_delete(dentry);
}
diff --git a/fs/namespace.c b/fs/namespace.c
index 587eb0d707ee8d..79bd8a46e1e729 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -160,7 +160,7 @@ clone_mnt(struct vfsmount *old, struct dentry *root)
mnt->mnt_root = dget(root);
mnt->mnt_mountpoint = mnt->mnt_root;
mnt->mnt_parent = mnt;
- mnt->mnt_namespace = old->mnt_namespace;
+ mnt->mnt_namespace = current->namespace;
/* stick the duplicate mount on the same expiry list
* as the original if that was on one */