diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-27 19:23:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-27 19:23:12 -0400 |
commit | 3ae5080f4c2e293229508dabe7c8a90af4e4c460 (patch) | |
tree | 9cb11f26905a82b7fac9d3b8f9d61d58bc5c94b0 /fs/notify/inotify/inotify.c | |
parent | 2c9e15a011c55ff96b2b8d2b126d1b9a96abba20 (diff) | |
parent | aabb8fdb41128705fd1627f56fdd571e45fdbcdb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
fs: avoid I_NEW inodes
Merge code for single and multiple-instance mounts
Remove get_init_pts_sb()
Move common mknod_ptmx() calls into caller
Parse mount options just once and copy them to super block
Unroll essentials of do_remount_sb() into devpts
vfs: simple_set_mnt() should return void
fs: move bdev code out of buffer.c
constify dentry_operations: rest
constify dentry_operations: configfs
constify dentry_operations: sysfs
constify dentry_operations: JFS
constify dentry_operations: OCFS2
constify dentry_operations: GFS2
constify dentry_operations: FAT
constify dentry_operations: FUSE
constify dentry_operations: procfs
constify dentry_operations: ecryptfs
constify dentry_operations: CIFS
constify dentry_operations: AFS
...
Diffstat (limited to 'fs/notify/inotify/inotify.c')
-rw-r--r-- | fs/notify/inotify/inotify.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/notify/inotify/inotify.c b/fs/notify/inotify/inotify.c index 331f2e88e284..220c13f0d73d 100644 --- a/fs/notify/inotify/inotify.c +++ b/fs/notify/inotify/inotify.c | |||
@@ -380,6 +380,14 @@ void inotify_unmount_inodes(struct list_head *list) | |||
380 | struct list_head *watches; | 380 | struct list_head *watches; |
381 | 381 | ||
382 | /* | 382 | /* |
383 | * We cannot __iget() an inode in state I_CLEAR, I_FREEING, | ||
384 | * I_WILL_FREE, or I_NEW which is fine because by that point | ||
385 | * the inode cannot have any associated watches. | ||
386 | */ | ||
387 | if (inode->i_state & (I_CLEAR|I_FREEING|I_WILL_FREE|I_NEW)) | ||
388 | continue; | ||
389 | |||
390 | /* | ||
383 | * If i_count is zero, the inode cannot have any watches and | 391 | * If i_count is zero, the inode cannot have any watches and |
384 | * doing an __iget/iput with MS_ACTIVE clear would actually | 392 | * doing an __iget/iput with MS_ACTIVE clear would actually |
385 | * evict all inodes with zero i_count from icache which is | 393 | * evict all inodes with zero i_count from icache which is |
@@ -388,14 +396,6 @@ void inotify_unmount_inodes(struct list_head *list) | |||
388 | if (!atomic_read(&inode->i_count)) | 396 | if (!atomic_read(&inode->i_count)) |
389 | continue; | 397 | continue; |
390 | 398 | ||
391 | /* | ||
392 | * We cannot __iget() an inode in state I_CLEAR, I_FREEING, or | ||
393 | * I_WILL_FREE which is fine because by that point the inode | ||
394 | * cannot have any associated watches. | ||
395 | */ | ||
396 | if (inode->i_state & (I_CLEAR | I_FREEING | I_WILL_FREE)) | ||
397 | continue; | ||
398 | |||
399 | need_iput_tmp = need_iput; | 399 | need_iput_tmp = need_iput; |
400 | need_iput = NULL; | 400 | need_iput = NULL; |
401 | /* In case inotify_remove_watch_locked() drops a reference. */ | 401 | /* In case inotify_remove_watch_locked() drops a reference. */ |