diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-04 15:27:05 (GMT) |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-05-04 15:29:05 (GMT) |
commit | 5306293c9cd2caf41849cc909281bda628bb989e (patch) | |
tree | 3be4e8231e2772c8a43ddbef5c6a72c20b3054bb /fs/ocfs2/inode.c | |
parent | dbd65a7e44fff4741a0b2c84bd6bace85d22c242 (diff) | |
parent | 66f41d4c5c8a5deed66fdcc84509376c9a0bf9d8 (diff) | |
download | linux-fsl-qoriq-5306293c9cd2caf41849cc909281bda628bb989e.tar.xz |
Merge commit 'v2.6.34-rc6'
Conflicts:
fs/nfsd/nfs4callback.c
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 278a223..07cc8bb 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -25,7 +25,6 @@ #include <linux/fs.h> #include <linux/types.h> -#include <linux/slab.h> #include <linux/highmem.h> #include <linux/pagemap.h> #include <linux/quotaops.h> @@ -891,6 +890,21 @@ static int ocfs2_query_inode_wipe(struct inode *inode, /* Do some basic inode verification... */ di = (struct ocfs2_dinode *) di_bh->b_data; if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL))) { + /* + * Inodes in the orphan dir must have ORPHANED_FL. The only + * inodes that come back out of the orphan dir are reflink + * targets. A reflink target may be moved out of the orphan + * dir between the time we scan the directory and the time we + * process it. This would lead to HAS_REFCOUNT_FL being set but + * ORPHANED_FL not. + */ + if (di->i_dyn_features & cpu_to_le16(OCFS2_HAS_REFCOUNT_FL)) { + mlog(0, "Reflinked inode %llu is no longer orphaned. " + "it shouldn't be deleted\n", + (unsigned long long)oi->ip_blkno); + goto bail; + } + /* for lack of a better error? */ status = -EEXIST; mlog(ML_ERROR, |