diff options
| author | Dave Airlie <airlied@redhat.com> | 2010-12-21 18:48:54 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2010-12-21 18:48:54 -0500 |
| commit | ae09f09e94d755ed45c58b695675636c0ec53f9e (patch) | |
| tree | 77cb9bac7d81f5b1250b8638a007e10c17b600af /fs/btrfs/tree-log.c | |
| parent | 1d99e5c57255d188773fb437391df24fe8faf575 (diff) | |
| parent | 5909a77ac62cc042f94bd262016cf468a2f96022 (diff) | |
Merge remote branch 'intel/drm-intel-next' of /ssd/git/drm-next into drm-core-next
* 'intel/drm-intel-next' of /ssd/git/drm-next: (771 commits)
drm/i915: Undo "Uncouple render/power ctx before suspending"
drm/i915: Allow the application to choose the constant addressing mode
drm/i915: dynamic render p-state support for Sandy Bridge
drm/i915: Enable EI mode for RCx decision making on Sandybridge
drm/i915/sdvo: Border and stall select became test bits in gen5
drm/i915: Add Guess-o-matic for pageflip timestamping.
drm/i915: Add support for precise vblank timestamping (v2)
drm/i915: Add frame buffer compression on Sandybridge
drm/i915: Add self-refresh support on Sandybridge
drm/i915: Wait for vblank before unpinning old fb
Revert "drm/i915: Avoid using PIPE_CONTROL on Ironlake"
drm/i915: Pass clock limits down to PLL matcher
drm/i915: Poll for seqno completion if IRQ is disabled
drm/i915/ringbuffer: Make IRQ refcnting atomic
agp/intel: Fix missed cached memory flags setting in i965_write_entry()
drm/i915/sdvo: Only use the SDVO pin if it is in the valid range
drm/i915: Enable RC6 autodownclocking on Sandybridge
drm/i915: Terminate the FORCE WAKE after we have finished reading
drm/i915/gtt: Clear the cachelines upon resume
drm/i915: Restore GTT mapping first upon resume
...
Diffstat (limited to 'fs/btrfs/tree-log.c')
| -rw-r--r-- | fs/btrfs/tree-log.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index a29f19384a27..054744ac5719 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
| @@ -2869,6 +2869,7 @@ static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans, | |||
| 2869 | { | 2869 | { |
| 2870 | int ret = 0; | 2870 | int ret = 0; |
| 2871 | struct btrfs_root *root; | 2871 | struct btrfs_root *root; |
| 2872 | struct dentry *old_parent = NULL; | ||
| 2872 | 2873 | ||
| 2873 | /* | 2874 | /* |
| 2874 | * for regular files, if its inode is already on disk, we don't | 2875 | * for regular files, if its inode is already on disk, we don't |
| @@ -2910,10 +2911,13 @@ static noinline int check_parent_dirs_for_sync(struct btrfs_trans_handle *trans, | |||
| 2910 | if (IS_ROOT(parent)) | 2911 | if (IS_ROOT(parent)) |
| 2911 | break; | 2912 | break; |
| 2912 | 2913 | ||
| 2913 | parent = parent->d_parent; | 2914 | parent = dget_parent(parent); |
| 2915 | dput(old_parent); | ||
| 2916 | old_parent = parent; | ||
| 2914 | inode = parent->d_inode; | 2917 | inode = parent->d_inode; |
| 2915 | 2918 | ||
| 2916 | } | 2919 | } |
| 2920 | dput(old_parent); | ||
| 2917 | out: | 2921 | out: |
| 2918 | return ret; | 2922 | return ret; |
| 2919 | } | 2923 | } |
| @@ -2945,6 +2949,7 @@ int btrfs_log_inode_parent(struct btrfs_trans_handle *trans, | |||
| 2945 | { | 2949 | { |
| 2946 | int inode_only = exists_only ? LOG_INODE_EXISTS : LOG_INODE_ALL; | 2950 | int inode_only = exists_only ? LOG_INODE_EXISTS : LOG_INODE_ALL; |
| 2947 | struct super_block *sb; | 2951 | struct super_block *sb; |
| 2952 | struct dentry *old_parent = NULL; | ||
| 2948 | int ret = 0; | 2953 | int ret = 0; |
| 2949 | u64 last_committed = root->fs_info->last_trans_committed; | 2954 | u64 last_committed = root->fs_info->last_trans_committed; |
| 2950 | 2955 | ||
| @@ -3016,10 +3021,13 @@ int btrfs_log_inode_parent(struct btrfs_trans_handle *trans, | |||
| 3016 | if (IS_ROOT(parent)) | 3021 | if (IS_ROOT(parent)) |
| 3017 | break; | 3022 | break; |
| 3018 | 3023 | ||
| 3019 | parent = parent->d_parent; | 3024 | parent = dget_parent(parent); |
| 3025 | dput(old_parent); | ||
| 3026 | old_parent = parent; | ||
| 3020 | } | 3027 | } |
| 3021 | ret = 0; | 3028 | ret = 0; |
| 3022 | end_trans: | 3029 | end_trans: |
| 3030 | dput(old_parent); | ||
| 3023 | if (ret < 0) { | 3031 | if (ret < 0) { |
| 3024 | BUG_ON(ret != -ENOSPC); | 3032 | BUG_ON(ret != -ENOSPC); |
| 3025 | root->fs_info->last_trans_log_full_commit = trans->transid; | 3033 | root->fs_info->last_trans_log_full_commit = trans->transid; |
| @@ -3039,8 +3047,13 @@ end_no_trans: | |||
| 3039 | int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, | 3047 | int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans, |
| 3040 | struct btrfs_root *root, struct dentry *dentry) | 3048 | struct btrfs_root *root, struct dentry *dentry) |
| 3041 | { | 3049 | { |
| 3042 | return btrfs_log_inode_parent(trans, root, dentry->d_inode, | 3050 | struct dentry *parent = dget_parent(dentry); |
| 3043 | dentry->d_parent, 0); | 3051 | int ret; |
| 3052 | |||
| 3053 | ret = btrfs_log_inode_parent(trans, root, dentry->d_inode, parent, 0); | ||
| 3054 | dput(parent); | ||
| 3055 | |||
| 3056 | return ret; | ||
| 3044 | } | 3057 | } |
| 3045 | 3058 | ||
| 3046 | /* | 3059 | /* |
