diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-20 02:25:00 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-29 21:24:15 +0400 |
commit | a8104a9fcdeb82e22d7acd55fca20746581067d3 (patch) | |
tree | 3036dae685f9b12a878dd02e439f0050114d7745 /fs/ocfs2 | |
parent | 8e4bfca1d1f0de62301dd223675717e7a5f63a27 (diff) | |
download | linux-a8104a9fcdeb82e22d7acd55fca20746581067d3.tar.xz |
pull mnt_want_write()/mnt_drop_write() into kern_path_create()/done_path_create() resp.
One side effect - attempt to create a cross-device link on a read-only fs fails
with EROFS instead of EXDEV now. Makes more sense, POSIX allows, etc.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 23cf78f68503..30a055049e16 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4466,16 +4466,9 @@ int ocfs2_reflink_ioctl(struct inode *inode, goto out_dput; } - error = mnt_want_write(new_path.mnt); - if (error) { - mlog_errno(error); - goto out_dput; - } - error = ocfs2_vfs_reflink(old_path.dentry, new_path.dentry->d_inode, new_dentry, preserve); - mnt_drop_write(new_path.mnt); out_dput: done_path_create(&new_path, new_dentry); out: |