Re: [PATCH 07/13] vfs: lock_two_nondirectories: allow directory args

2014-02-11 Thread Miklos Szeredi
On Fri, Feb 07, 2014 at 04:16:44PM -0500, J. Bruce Fields wrote: > > Nit: I find the conditionals here a little complicated. > > Would something like this be clearer? (Untested): > > if (inode1 > inode2) > swap(inode1, inode2); > > if (inode1 && !S_ISDIR(inode1->i_mode

Re: [PATCH 07/13] vfs: lock_two_nondirectories: allow directory args

2014-02-07 Thread J. Bruce Fields
On Fri, Feb 07, 2014 at 05:49:05PM +0100, Miklos Szeredi wrote: > From: Miklos Szeredi > > lock_two_nondirectories warned if either of its args was a directory. > Instead just ignore the directory args. This is needed for locking in > cross rename. > > Signed-off-by: Miklos Szeredi > --- > fs

[PATCH 07/13] vfs: lock_two_nondirectories: allow directory args

2014-02-07 Thread Miklos Szeredi
From: Miklos Szeredi lock_two_nondirectories warned if either of its args was a directory. Instead just ignore the directory args. This is needed for locking in cross rename. Signed-off-by: Miklos Szeredi --- fs/inode.c | 20 1 file changed, 12 insertions(+), 8 deletions(