alistair23-linux/fs/ocfs2
Younger Liu ea45466aec ocfs2: need rollback when journal_access failed in ocfs2_orphan_add()
While adding a file into orphan dir in ocfs2_orphan_add(), it calls
__ocfs2_add_entry() before ocfs2_journal_access_di().  If
ocfs2_journal_access_di() failed, the file is added into orphan dir, and
orphan dir dinode updated, but file dinode has not been updated.
Accordingly, the data is not consistent between file dinode and orphan
dir.

So, need to call ocfs2_journal_access_di() before __ocfs2_add_entry(),
and if ocfs2_journal_access_di() failed, orphan_fe and
orphan_dir_inode->i_nlink need rollback.

This bug was added by 3939fda4 ("Ocfs2: Journaling i_flags and
i_orphaned_slot when adding inode to orphan dir.").

Signed-off-by: Younger Liu <younger.liu@huawei.com>
Acked-by: Jeff Liu <jeff.liu@oracle.com>
Cc: Sunil Mushran <sunil.mushran@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-03 16:07:24 -07:00
..
cluster fs/ocfs2/cluster/tcp.c: free sc->sc_page in sc_kref_release() 2013-07-03 16:07:23 -07:00
dlm ocfs2: dlmlock_master() should return DLM_NORMAL after adding lock to blocked list 2013-07-03 16:07:24 -07:00
dlmfs fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
acl.c ocfs2: Handle kuids and kgids in acl/xattr conversions. 2013-02-13 06:00:56 -08:00
acl.h fs: take the ACL checks to common code 2011-07-25 14:30:23 -04:00
alloc.c ocfs2: fix mutex_unlock and possible memory leak in ocfs2_remove_btree_range 2013-07-03 16:07:23 -07:00
alloc.h ocfs2: Add ocfs2_trim_fs for SSD trim support. 2011-05-23 23:37:18 -07:00
aops.c ocfs2: use ->invalidatepage() length argument 2013-05-21 23:58:46 -04:00
aops.h aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -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: Remove masklog ML_UPTODATE. 2011-02-24 16:22:20 +08:00
buffer_head_io.h
dcache.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
dcache.h Track negative entries v3 2010-09-10 09:18:15 -07:00
dir.c [readdir] convert ocfs2 2013-06-29 12:57:02 +04:00
dir.h [readdir] convert ocfs2 2013-06-29 12:57:02 +04:00
dlmglue.c aio: remove retry-based AIO 2013-05-07 18:38:27 -07:00
dlmglue.h ocfs2: Fix lockdep warning in reflink. 2010-09-10 09:19:06 -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: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap() 2013-05-24 16:22:52 -07:00
extent_map.h ocfs2: Implement llseek() 2011-07-25 14:58:15 -07:00
file.c vfs: export lseek_execute() to modules 2013-07-03 16:23:27 +04:00
file.h ->permission() sanitizing: don't pass flags to ->permission() 2011-07-20 01:43:24 -04:00
heartbeat.c ocfs2: Remove mlog(0) from fs/ocfs2/heartbeat.c 2011-02-23 21:17:39 +08:00
heartbeat.h
inode.c ocfs2: Convert uid and gids between in core and on disk inodes 2013-02-13 06:00:58 -08:00
inode.h aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
ioctl.c ocfs2: fix error return code in ocfs2_info_handle_freefrag() 2013-04-29 15:54:27 -07:00
ioctl.h Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h 2010-03-02 14:10:20 -08:00
journal.c [readdir] convert ocfs2 2013-06-29 12:57:02 +04:00
journal.h fs/ocfs2/journal.h: add bits_wanted while calculating credits in ocfs2_calc_extend_credits 2013-07-03 16:07:23 -07:00
Kconfig ocfs2: Make OCFS2_FS depend on CONFIGFS_FS 2011-01-16 21:22:40 +00:00
localalloc.c ocfs2: remove kfree() redundant null checks 2013-02-21 17:22:19 -08:00
localalloc.h ocfs2: increase the default size of local alloc windows 2010-05-05 18:18:07 -07:00
locks.c ocfs2: remove INODE from unused files. 2011-02-21 11:18:23 +08:00
locks.h
Makefile Ocfs2/move_extents: Add basic framework and source files for extent moving. 2011-05-25 15:17:08 +08:00
mmap.c kill f_vfsmnt 2013-02-26 02:46:10 -05:00
mmap.h
move_extents.c ocfs2: fix NULL dereference for moving extents 2013-04-29 15:54:27 -07:00
move_extents.h Ocfs2/move_extents: move/defrag extents within a certain range. 2011-05-25 15:17:12 +08:00
namei.c ocfs2: need rollback when journal_access failed in ocfs2_orphan_add() 2013-07-03 16:07:24 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: remove unecessary variable needs_checkpoint 2013-07-03 16:07:23 -07:00
ocfs2_fs.h Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
ocfs2_ioctl.h Ocfs2/move_extents: Adding new ioctl code 'OCFS2_IOC_MOVE_EXT' to ocfs2. 2011-05-25 15:17:08 +08:00
ocfs2_lockid.h
ocfs2_lockingver.h ocfs2_dlmfs: Enable the use of user cluster stacks. 2010-02-26 15:41:18 -08:00
ocfs2_trace.h ocfs2: Add trace event for trim. 2011-05-23 23:37:20 -07:00
quota.h ocfs2: use system_wq instead of ocfs2_quota_wq 2011-02-01 11:42:42 +01:00
quota_global.c userns: Convert struct dquot dq_id to be a struct kqid 2012-09-18 01:01:41 -07:00
quota_local.c userns: Convert struct dquot dq_id to be a struct kqid 2012-09-18 01:01:41 -07:00
refcounttree.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
refcounttree.h Ocfs2/refcounttree: Publicize couple of funcs from refcounttree.c 2011-05-25 15:17:08 +08:00
reservations.c ocfs2: Remove masklog ML_RESERVATIONS. 2011-02-23 22:10:56 +08:00
reservations.h Fix common misspellings 2011-03-31 11:26:23 -03:00
resize.c ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.c 2011-02-22 08:24:01 +08:00
resize.h
slot_map.c ocfs2: Clean up messages in the fs 2011-07-24 10:34:54 -07:00
slot_map.h
stack_o2cb.c ocfs2: remove kfree() redundant null checks 2013-02-21 17:22:19 -08:00
stack_user.c dlm: add recovery callbacks 2012-01-04 08:56:31 -06:00
stackglue.c ocfs2_dlmfs: Enable the use of user cluster stacks. 2010-02-26 15:41:18 -08:00
stackglue.h Fix common misspellings 2011-03-31 11:26:23 -03:00
suballoc.c ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink 2013-02-27 19:10:09 -08:00
suballoc.h ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink 2013-02-27 19:10:09 -08:00
super.c ocfs2: remove unecessary variable needs_checkpoint 2013-07-03 16:07:23 -07:00
super.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
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: remove kfree() redundant null checks 2013-02-21 17:22:19 -08:00
sysfile.h
uptodate.c ocfs2: Remove masklog ML_UPTODATE. 2011-02-24 16:22:20 +08:00
uptodate.h
ver.c
ver.h
xattr.c ocfs2: xattr: remove useless free space checking 2013-07-03 16:07:24 -07:00
xattr.h ocfs2: propagate umode_t 2012-01-03 22:55:02 -05:00