Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d39dd11c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  fs: simplify iget & friends
  fs: pull inode->i_lock up out of writeback_single_inode
  fs: rename inode_lock to inode_hash_lock
  fs: move i_wb_list out from under inode_lock
  fs: move i_sb_list out from under inode_lock
  fs: remove inode_lock from iput_final and prune_icache
  fs: Lock the inode LRU list separately
  fs: factor inode disposal
  fs: protect inode->i_state with inode->i_lock
  autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
  autofs4 - remove autofs4_lock
  autofs4 - fix d_manage() return on rcu-walk
  autofs4 - fix autofs4_expire_indirect() traversal
  autofs4 - fix dentry leak in autofs4_expire_direct()
  autofs4 - reinstate last used update on access
  vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
parents 30f5b28e 0b2d0724
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -128,7 +128,7 @@ alloc_inode:
destroy_inode:
destroy_inode:
dirty_inode:				(must not sleep)
dirty_inode:				(must not sleep)
write_inode:
write_inode:
drop_inode:				!!!inode_lock!!!
drop_inode:				!!!inode->i_lock!!!
evict_inode:
evict_inode:
put_super:		write
put_super:		write
write_super:		read
write_super:		read
+11 −5
Original line number Original line Diff line number Diff line
@@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has
remaining links or not.  Caller does *not* evict the pagecache or inode-associated
remaining links or not.  Caller does *not* evict the pagecache or inode-associated
metadata buffers; getting rid of those is responsibility of method, as it had
metadata buffers; getting rid of those is responsibility of method, as it had
been for ->delete_inode().
been for ->delete_inode().
	->drop_inode() returns int now; it's called on final iput() with inode_lock

held and it returns true if filesystems wants the inode to be dropped.  As before,
	->drop_inode() returns int now; it's called on final iput() with
generic_drop_inode() is still the default and it's been updated appropriately.
inode->i_lock held and it returns true if filesystems wants the inode to be
generic_delete_inode() is also alive and it consists simply of return 1.  Note that
dropped.  As before, generic_drop_inode() is still the default and it's been
all actual eviction work is done by caller after ->drop_inode() returns.
updated appropriately.  generic_delete_inode() is also alive and it consists
simply of return 1.  Note that all actual eviction work is done by caller after
->drop_inode() returns.

	clear_inode() is gone; use end_writeback() instead.  As before, it must
	clear_inode() is gone; use end_writeback() instead.  As before, it must
be called exactly once on each call of ->evict_inode() (as it used to be for
be called exactly once on each call of ->evict_inode() (as it used to be for
each call of ->delete_inode()).  Unlike before, if you are using inode-associated
each call of ->delete_inode()).  Unlike before, if you are using inode-associated
@@ -395,6 +398,9 @@ Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
so the i_size should not change when hole punching, even when puching the end of
so the i_size should not change when hole punching, even when puching the end of
a file off.
a file off.


--
[mandatory]

--
--
[mandatory]
[mandatory]
	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
	->get_sb() is gone.  Switch to use of ->mount().  Typically it's just
+1 −1
Original line number Original line Diff line number Diff line
@@ -254,7 +254,7 @@ or bottom half).
	should be synchronous or not, not all filesystems check this flag.
	should be synchronous or not, not all filesystems check this flag.


  drop_inode: called when the last access to the inode is dropped,
  drop_inode: called when the last access to the inode is dropped,
	with the inode_lock spinlock held.
	with the inode->i_lock spinlock held.


	This method should be either NULL (normal UNIX filesystem
	This method should be either NULL (normal UNIX filesystem
	semantics) or "generic_delete_inode" (for filesystems that do not
	semantics) or "generic_delete_inode" (for filesystems that do not
+0 −2
Original line number Original line Diff line number Diff line
@@ -61,8 +61,6 @@ do { \
		current->pid, __func__, ##args);	\
		current->pid, __func__, ##args);	\
} while (0)
} while (0)


extern spinlock_t autofs4_lock;

/* Unified info structure.  This is pointed to by both the dentry and
/* Unified info structure.  This is pointed to by both the dentry and
   inode structures.  Each file in the filesystem has an instance of this
   inode structures.  Each file in the filesystem has an instance of this
   structure.  It holds a reference to the dentry, so dentries are never
   structure.  It holds a reference to the dentry, so dentries are never
+4 −0
Original line number Original line Diff line number Diff line
@@ -372,6 +372,10 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
		return -EBUSY;
		return -EBUSY;
	} else {
	} else {
		struct file *pipe = fget(pipefd);
		struct file *pipe = fget(pipefd);
		if (!pipe) {
			err = -EBADF;
			goto out;
		}
		if (!pipe->f_op || !pipe->f_op->write) {
		if (!pipe->f_op || !pipe->f_op->write) {
			err = -EPIPE;
			err = -EPIPE;
			fput(pipe);
			fput(pipe);
Loading