Xue jiufei
53dc20b9a3
ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
...
In ocfs2_link(), the parent directory inode passed to function
ocfs2_lookup_ino_from_name() is wrong. Parameter dir is the parent of
new_dentry not old_dentry. We should get old_dir from old_dentry and
lookup old_dentry in old_dir in case another node remove the old dentry.
With this change, hard linking works again, when paths are relative with
at least one subdirectory. This is how the problem was reproducable:
# mkdir a
# mkdir b
# touch a/test
# ln a/test b/test
ln: failed to create hard link `b/test' => `a/test': No such file or directory
However when creating links in the same dir, it worked well.
Now the link gets created.
Fixes: 0e048316ff ("ocfs2: check existence of old dentry in ocfs2_link()")
Signed-off-by: joyce.xue <[email protected] >
Reported-by: Szabo Aron - UBIT <[email protected] >
Cc: Mark Fasheh <[email protected] >
Cc: Joel Becker <[email protected] >
Tested-by: Aron Szabo <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2015-01-08 15:10:51 -08:00
..
cluster
ocfs2: o2net: fix connect expired
2014-12-10 17:41:03 -08:00
dlm
ocfs2: remove bogus check in dlm_process_recovery_data
2015-01-08 15:10:51 -08:00
dlmfs
assorted conversions to %p[dD]
2014-11-19 13:01:20 -05:00
acl.c
ocfs2: call ocfs2_update_inode_fsync_trans when updating any inode
2014-04-03 16:20:56 -07:00
acl.h
ocfs2: use generic posix ACL infrastructure
2014-01-25 23:58:21 -05:00
alloc.c
ocfs2: reflink: fix slow unlink for refcounted file
2014-12-18 19:08:11 -08:00
alloc.h
ocfs2: reflink: fix slow unlink for refcounted file
2014-12-18 19:08:11 -08:00
aops.c
ocfs2: fix journal commit deadlock
2014-12-18 19:08:11 -08:00
aops.h
ocfs2: change ip_unaligned_aio to of type mutex from atomit_t
2014-04-03 16:20:53 -07:00
blockcheck.c
ocfs2: kill endianness abuses in blockcheck.c
2012-05-29 23:28:35 -04:00
blockcheck.h
buffer_head_io.c
ocfs2: do not put bh when buffer_uptodate failed
2014-04-03 16:20:56 -07:00
buffer_head_io.h
dcache.c
assorted conversions to %p[dD]
2014-11-19 13:01:20 -05:00
dcache.h
ocfs2: revert iput deferring code in ocfs2_drop_dentry_lock
2014-04-03 16:20:55 -07:00
dir.c
ocfs2: reflink: fix slow unlink for refcounted file
2014-12-18 19:08:11 -08:00
dir.h
[readdir] convert ocfs2
2013-06-29 12:57:02 +04:00
dlmglue.c
Merge branch 'akpm' (patchbomb from Andrew)
2014-12-10 18:34:42 -08:00
dlmglue.h
ocfs2: avoid blocking in ocfs2_mark_lockres_freeing() in downconvert thread
2014-04-03 16:20:55 -07:00
export.c
fs: encode_fh: return FILEID_INVALID if invalid fid_type
2013-02-26 02:46:10 -05:00
export.h
extent_map.c
ocfs2: fix the end cluster offset of FIEMAP
2013-09-11 15:56:53 -07:00
extent_map.h
file.c
ocfs2: reflink: fix slow unlink for refcounted file
2014-12-18 19:08:11 -08:00
file.h
heartbeat.c
heartbeat.h
inode.c
ocfs2: remove bogus test from ocfs2_read_locked_inode()
2014-12-10 17:41:03 -08:00
inode.h
ocfs2: Convert to private i_dquot field
2014-11-10 10:06:11 +01:00
ioctl.c
ocfs2: do not write error flag to user structure we cannot copy from/to
2014-08-29 16:28:16 -07:00
ioctl.h
journal.c
vfs: make first argument of dir_context.actor typed
2014-10-31 17:48:54 -04:00
journal.h
ocfs2: improve fsync efficiency and fix deadlock between aio_write and sync_file
2014-04-03 16:20:53 -07:00
Kconfig
localalloc.c
ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
2014-02-06 13:48:51 -08:00
localalloc.h
ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
2014-02-06 13:48:51 -08:00
locks.c
ocfs2: flock: drop cross-node lock when failed locally
2014-04-03 16:20:56 -07:00
locks.h
Makefile
ocfs2: remove versioning information
2014-01-21 16:19:41 -08:00
mmap.c
kill f_vfsmnt
2013-02-26 02:46:10 -05:00
mmap.h
move_extents.c
ocfs2: remove bogus NULL check in ocfs2_move_extents()
2014-12-10 17:41:04 -08:00
move_extents.h
namei.c
ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
2015-01-08 15:10:51 -08:00
namei.h
ocfs1_fs_compat.h
ocfs2.h
ocfs2: do not set OCFS2_LOCK_UPCONVERT_FINISHING if nonblocking lock can not be granted at once
2014-12-10 17:41:03 -08:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
ocfs2: fix a tiny race when running dirop_fileop_racer
2014-06-23 16:47:45 -07:00
quota.h
ocfs2: Don't use MAXQUOTAS value
2014-09-17 11:59:12 +02:00
quota_global.c
ocfs2: Don't use MAXQUOTAS value
2014-09-17 11:59:12 +02:00
quota_local.c
ocfs2: Don't use MAXQUOTAS value
2014-09-17 11:59:12 +02:00
refcounttree.c
ocfs2: correctly check the return value of ocfs2_search_extent_list
2014-08-06 18:01:13 -07:00
refcounttree.h
ocfs2: fix NULL pointer dereference in ocfs2_duplicate_clusters_by_page
2013-08-13 17:57:49 -07:00
reservations.c
reservations.h
resize.c
ocfs2: fix incorrect i_size of global bitmap inode after resize
2014-06-04 16:53:54 -07:00
resize.h
slot_map.c
ocfs2: fix an off-by-one BUG_ON() statement
2014-12-10 17:41:03 -08:00
slot_map.h
stack_o2cb.c
ocfs2: pass ocfs2_cluster_connection to ocfs2_this_node
2014-01-21 16:19:41 -08:00
stack_user.c
fs/ocfs2/stack_user.c: fix typo in ocfs2_control_release()
2014-10-09 22:25:46 -04:00
stackglue.c
ocfs2: remove NULL assignments on static
2014-06-04 16:53:53 -07:00
stackglue.h
ocfs2: pass ocfs2_cluster_connection to ocfs2_this_node
2014-01-21 16:19:41 -08:00
suballoc.c
ocfs2: iput inode alloc when failed locally
2014-04-03 16:20:57 -07:00
suballoc.h
ocfs2: rollback alloc_dinode counts when ocfs2_block_group_set_bits() failed
2014-04-03 16:20:56 -07:00
super.c
Merge branch 'akpm' (patchbomb from Andrew)
2014-12-10 18:34:42 -08:00
super.h
symlink.c
ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
2013-02-26 02:46:12 -05:00
symlink.h
ocfs: simplify symlink handling
2012-05-29 23:28:40 -04:00
sysfile.c
ocfs2: avoid system inode ref confusion by adding mutex lock
2014-04-03 16:20:57 -07:00
sysfile.h
uptodate.c
ocfs2: remove NULL assignments on static
2014-06-04 16:53:53 -07:00
uptodate.h
xattr.c
ocfs2: Fix xattr check in ocfs2_get_xattr_nolock()
2014-12-10 17:41:03 -08:00
xattr.h
ocfs2: use generic posix ACL infrastructure
2014-01-25 23:58:21 -05:00