linux/fs/ocfs2/inode.c
<<
>>
Prefs
   1/* -*- mode: c; c-basic-offset: 8; -*-
   2 * vim: noexpandtab sw=8 ts=8 sts=0:
   3 *
   4 * inode.c
   5 *
   6 * vfs' aops, fops, dops and iops
   7 *
   8 * Copyright (C) 2002, 2004 Oracle.  All rights reserved.
   9 *
  10 * This program is free software; you can redistribute it and/or
  11 * modify it under the terms of the GNU General Public
  12 * License as published by the Free Software Foundation; either
  13 * version 2 of the License, or (at your option) any later version.
  14 *
  15 * This program is distributed in the hope that it will be useful,
  16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18 * General Public License for more details.
  19 *
  20 * You should have received a copy of the GNU General Public
  21 * License along with this program; if not, write to the
  22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23 * Boston, MA 021110-1307, USA.
  24 */
  25
  26#include <linux/fs.h>
  27#include <linux/types.h>
  28#include <linux/highmem.h>
  29#include <linux/pagemap.h>
  30#include <linux/quotaops.h>
  31
  32#include <asm/byteorder.h>
  33
  34#include <cluster/masklog.h>
  35
  36#include "ocfs2.h"
  37
  38#include "alloc.h"
  39#include "dir.h"
  40#include "blockcheck.h"
  41#include "dlmglue.h"
  42#include "extent_map.h"
  43#include "file.h"
  44#include "heartbeat.h"
  45#include "inode.h"
  46#include "journal.h"
  47#include "namei.h"
  48#include "suballoc.h"
  49#include "super.h"
  50#include "symlink.h"
  51#include "sysfile.h"
  52#include "uptodate.h"
  53#include "xattr.h"
  54#include "refcounttree.h"
  55#include "ocfs2_trace.h"
  56
  57#include "buffer_head_io.h"
  58
  59struct ocfs2_find_inode_args
  60{
  61        u64             fi_blkno;
  62        unsigned long   fi_ino;
  63        unsigned int    fi_flags;
  64        unsigned int    fi_sysfile_type;
  65};
  66
  67static struct lock_class_key ocfs2_sysfile_lock_key[NUM_SYSTEM_INODES];
  68
  69static int ocfs2_read_locked_inode(struct inode *inode,
  70                                   struct ocfs2_find_inode_args *args);
  71static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
  72static int ocfs2_find_actor(struct inode *inode, void *opaque);
  73static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
  74                                    struct inode *inode,
  75                                    struct buffer_head *fe_bh);
  76
  77void ocfs2_set_inode_flags(struct inode *inode)
  78{
  79        unsigned int flags = OCFS2_I(inode)->ip_attr;
  80
  81        inode->i_flags &= ~(S_IMMUTABLE |
  82                S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC);
  83
  84        if (flags & OCFS2_IMMUTABLE_FL)
  85                inode->i_flags |= S_IMMUTABLE;
  86
  87        if (flags & OCFS2_SYNC_FL)
  88                inode->i_flags |= S_SYNC;
  89        if (flags & OCFS2_APPEND_FL)
  90                inode->i_flags |= S_APPEND;
  91        if (flags & OCFS2_NOATIME_FL)
  92                inode->i_flags |= S_NOATIME;
  93        if (flags & OCFS2_DIRSYNC_FL)
  94                inode->i_flags |= S_DIRSYNC;
  95}
  96
  97/* Propagate flags from i_flags to OCFS2_I(inode)->ip_attr */
  98void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi)
  99{
 100        unsigned int flags = oi->vfs_inode.i_flags;
 101
 102        oi->ip_attr &= ~(OCFS2_SYNC_FL|OCFS2_APPEND_FL|
 103                        OCFS2_IMMUTABLE_FL|OCFS2_NOATIME_FL|OCFS2_DIRSYNC_FL);
 104        if (flags & S_SYNC)
 105                oi->ip_attr |= OCFS2_SYNC_FL;
 106        if (flags & S_APPEND)
 107                oi->ip_attr |= OCFS2_APPEND_FL;
 108        if (flags & S_IMMUTABLE)
 109                oi->ip_attr |= OCFS2_IMMUTABLE_FL;
 110        if (flags & S_NOATIME)
 111                oi->ip_attr |= OCFS2_NOATIME_FL;
 112        if (flags & S_DIRSYNC)
 113                oi->ip_attr |= OCFS2_DIRSYNC_FL;
 114}
 115
 116struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno)
 117{
 118        struct ocfs2_find_inode_args args;
 119
 120        args.fi_blkno = blkno;
 121        args.fi_flags = 0;
 122        args.fi_ino = ino_from_blkno(sb, blkno);
 123        args.fi_sysfile_type = 0;
 124
 125        return ilookup5(sb, blkno, ocfs2_find_actor, &args);
 126}
 127struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
 128                         int sysfile_type)
 129{
 130        struct inode *inode = NULL;
 131        struct super_block *sb = osb->sb;
 132        struct ocfs2_find_inode_args args;
 133
 134        trace_ocfs2_iget_begin((unsigned long long)blkno, flags,
 135                               sysfile_type);
 136
 137        /* Ok. By now we've either got the offsets passed to us by the
 138         * caller, or we just pulled them off the bh. Lets do some
 139         * sanity checks to make sure they're OK. */
 140        if (blkno == 0) {
 141                inode = ERR_PTR(-EINVAL);
 142                mlog_errno(PTR_ERR(inode));
 143                goto bail;
 144        }
 145
 146        args.fi_blkno = blkno;
 147        args.fi_flags = flags;
 148        args.fi_ino = ino_from_blkno(sb, blkno);
 149        args.fi_sysfile_type = sysfile_type;
 150
 151        inode = iget5_locked(sb, args.fi_ino, ocfs2_find_actor,
 152                             ocfs2_init_locked_inode, &args);
 153        /* inode was *not* in the inode cache. 2.6.x requires
 154         * us to do our own read_inode call and unlock it
 155         * afterwards. */
 156        if (inode == NULL) {
 157                inode = ERR_PTR(-ENOMEM);
 158                mlog_errno(PTR_ERR(inode));
 159                goto bail;
 160        }
 161        trace_ocfs2_iget5_locked(inode->i_state);
 162        if (inode->i_state & I_NEW) {
 163                ocfs2_read_locked_inode(inode, &args);
 164                unlock_new_inode(inode);
 165        }
 166        if (is_bad_inode(inode)) {
 167                iput(inode);
 168                inode = ERR_PTR(-ESTALE);
 169                goto bail;
 170        }
 171
 172bail:
 173        if (!IS_ERR(inode)) {
 174                trace_ocfs2_iget_end(inode, 
 175                        (unsigned long long)OCFS2_I(inode)->ip_blkno);
 176        }
 177
 178        return inode;
 179}
 180
 181
 182/*
 183 * here's how inodes get read from disk:
 184 * iget5_locked -> find_actor -> OCFS2_FIND_ACTOR
 185 * found? : return the in-memory inode
 186 * not found? : get_new_inode -> OCFS2_INIT_LOCKED_INODE
 187 */
 188
 189static int ocfs2_find_actor(struct inode *inode, void *opaque)
 190{
 191        struct ocfs2_find_inode_args *args = NULL;
 192        struct ocfs2_inode_info *oi = OCFS2_I(inode);
 193        int ret = 0;
 194
 195        args = opaque;
 196
 197        mlog_bug_on_msg(!inode, "No inode in find actor!\n");
 198
 199        trace_ocfs2_find_actor(inode, inode->i_ino, opaque, args->fi_blkno);
 200
 201        if (oi->ip_blkno != args->fi_blkno)
 202                goto bail;
 203
 204        ret = 1;
 205bail:
 206        return ret;
 207}
 208
 209/*
 210 * initialize the new inode, but don't do anything that would cause
 211 * us to sleep.
 212 * return 0 on success, 1 on failure
 213 */
 214static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)
 215{
 216        struct ocfs2_find_inode_args *args = opaque;
 217        static struct lock_class_key ocfs2_quota_ip_alloc_sem_key,
 218                                     ocfs2_file_ip_alloc_sem_key;
 219
 220        inode->i_ino = args->fi_ino;
 221        OCFS2_I(inode)->ip_blkno = args->fi_blkno;
 222        if (args->fi_sysfile_type != 0)
 223                lockdep_set_class(&inode->i_mutex,
 224                        &ocfs2_sysfile_lock_key[args->fi_sysfile_type]);
 225        if (args->fi_sysfile_type == USER_QUOTA_SYSTEM_INODE ||
 226            args->fi_sysfile_type == GROUP_QUOTA_SYSTEM_INODE ||
 227            args->fi_sysfile_type == LOCAL_USER_QUOTA_SYSTEM_INODE ||
 228            args->fi_sysfile_type == LOCAL_GROUP_QUOTA_SYSTEM_INODE)
 229                lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem,
 230                                  &ocfs2_quota_ip_alloc_sem_key);
 231        else
 232                lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem,
 233                                  &ocfs2_file_ip_alloc_sem_key);
 234
 235        return 0;
 236}
 237
 238void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
 239                          int create_ino)
 240{
 241        struct super_block *sb;
 242        struct ocfs2_super *osb;
 243        int use_plocks = 1;
 244
 245        sb = inode->i_sb;
 246        osb = OCFS2_SB(sb);
 247
 248        if ((osb->s_mount_opt & OCFS2_MOUNT_LOCALFLOCKS) ||
 249            ocfs2_mount_local(osb) || !ocfs2_stack_supports_plocks())
 250                use_plocks = 0;
 251
 252        /*
 253         * These have all been checked by ocfs2_read_inode_block() or set
 254         * by ocfs2_mknod_locked(), so a failure is a code bug.
 255         */
 256        BUG_ON(!OCFS2_IS_VALID_DINODE(fe));  /* This means that read_inode
 257                                                cannot create a superblock
 258                                                inode today.  change if
 259                                                that is needed. */
 260        BUG_ON(!(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL)));
 261        BUG_ON(le32_to_cpu(fe->i_fs_generation) != osb->fs_generation);
 262
 263
 264        OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters);
 265        OCFS2_I(inode)->ip_attr = le32_to_cpu(fe->i_attr);
 266        OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features);
 267
 268        inode->i_version = 1;
 269        inode->i_generation = le32_to_cpu(fe->i_generation);
 270        inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev));
 271        inode->i_mode = le16_to_cpu(fe->i_mode);
 272        inode->i_uid = le32_to_cpu(fe->i_uid);
 273        inode->i_gid = le32_to_cpu(fe->i_gid);
 274
 275        /* Fast symlinks will have i_size but no allocated clusters. */
 276        if (S_ISLNK(inode->i_mode) && !fe->i_clusters) {
 277                inode->i_blocks = 0;
 278                inode->i_mapping->a_ops = &ocfs2_fast_symlink_aops;
 279        } else {
 280                inode->i_blocks = ocfs2_inode_sector_count(inode);
 281                inode->i_mapping->a_ops = &ocfs2_aops;
 282        }
 283        inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime);
 284        inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec);
 285        inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime);
 286        inode->i_mtime.tv_nsec = le32_to_cpu(fe->i_mtime_nsec);
 287        inode->i_ctime.tv_sec = le64_to_cpu(fe->i_ctime);
 288        inode->i_ctime.tv_nsec = le32_to_cpu(fe->i_ctime_nsec);
 289
 290        if (OCFS2_I(inode)->ip_blkno != le64_to_cpu(fe->i_blkno))
 291                mlog(ML_ERROR,
 292                     "ip_blkno %llu != i_blkno %llu!\n",
 293                     (unsigned long long)OCFS2_I(inode)->ip_blkno,
 294                     (unsigned long long)le64_to_cpu(fe->i_blkno));
 295
 296        set_nlink(inode, ocfs2_read_links_count(fe));
 297
 298        trace_ocfs2_populate_inode(OCFS2_I(inode)->ip_blkno,
 299                                   le32_to_cpu(fe->i_flags));
 300        if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) {
 301                OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SYSTEM_FILE;
 302                inode->i_flags |= S_NOQUOTA;
 303        }
 304  
 305        if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) {
 306                OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;
 307        } else if (fe->i_flags & cpu_to_le32(OCFS2_BITMAP_FL)) {
 308                OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;
 309        } else if (fe->i_flags & cpu_to_le32(OCFS2_QUOTA_FL)) {
 310                inode->i_flags |= S_NOQUOTA;
 311        } else if (fe->i_flags & cpu_to_le32(OCFS2_SUPER_BLOCK_FL)) {
 312                /* we can't actually hit this as read_inode can't
 313                 * handle superblocks today ;-) */
 314                BUG();
 315        }
 316
 317        switch (inode->i_mode & S_IFMT) {
 318            case S_IFREG:
 319                    if (use_plocks)
 320                            inode->i_fop = &ocfs2_fops;
 321                    else
 322                            inode->i_fop = &ocfs2_fops_no_plocks;
 323                    inode->i_op = &ocfs2_file_iops;
 324                    i_size_write(inode, le64_to_cpu(fe->i_size));
 325                    break;
 326            case S_IFDIR:
 327                    inode->i_op = &ocfs2_dir_iops;
 328                    if (use_plocks)
 329                            inode->i_fop = &ocfs2_dops;
 330                    else
 331                            inode->i_fop = &ocfs2_dops_no_plocks;
 332                    i_size_write(inode, le64_to_cpu(fe->i_size));
 333                    OCFS2_I(inode)->ip_dir_lock_gen = 1;
 334                    break;
 335            case S_IFLNK:
 336                    inode->i_op = &ocfs2_symlink_inode_operations;
 337                    i_size_write(inode, le64_to_cpu(fe->i_size));
 338                    break;
 339            default:
 340                    inode->i_op = &ocfs2_special_file_iops;
 341                    init_special_inode(inode, inode->i_mode,
 342                                       inode->i_rdev);
 343                    break;
 344        }
 345
 346        if (create_ino) {
 347                inode->i_ino = ino_from_blkno(inode->i_sb,
 348                               le64_to_cpu(fe->i_blkno));
 349
 350                /*
 351                 * If we ever want to create system files from kernel,
 352                 * the generation argument to
 353                 * ocfs2_inode_lock_res_init() will have to change.
 354                 */
 355                BUG_ON(le32_to_cpu(fe->i_flags) & OCFS2_SYSTEM_FL);
 356
 357                ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres,
 358                                          OCFS2_LOCK_TYPE_META, 0, inode);
 359
 360                ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres,
 361                                          OCFS2_LOCK_TYPE_OPEN, 0, inode);
 362        }
 363
 364        ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_rw_lockres,
 365                                  OCFS2_LOCK_TYPE_RW, inode->i_generation,
 366                                  inode);
 367
 368        ocfs2_set_inode_flags(inode);
 369
 370        OCFS2_I(inode)->ip_last_used_slot = 0;
 371        OCFS2_I(inode)->ip_last_used_group = 0;
 372
 373        if (S_ISDIR(inode->i_mode))
 374                ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv,
 375                                    OCFS2_RESV_FLAG_DIR);
 376}
 377
 378static int ocfs2_read_locked_inode(struct inode *inode,
 379                                   struct ocfs2_find_inode_args *args)
 380{
 381        struct super_block *sb;
 382        struct ocfs2_super *osb;
 383        struct ocfs2_dinode *fe;
 384        struct buffer_head *bh = NULL;
 385        int status, can_lock;
 386        u32 generation = 0;
 387
 388        status = -EINVAL;
 389        if (inode == NULL || inode->i_sb == NULL) {
 390                mlog(ML_ERROR, "bad inode\n");
 391                return status;
 392        }
 393        sb = inode->i_sb;
 394        osb = OCFS2_SB(sb);
 395
 396        if (!args) {
 397                mlog(ML_ERROR, "bad inode args\n");
 398                make_bad_inode(inode);
 399                return status;
 400        }
 401
 402        /*
 403         * To improve performance of cold-cache inode stats, we take
 404         * the cluster lock here if possible.
 405         *
 406         * Generally, OCFS2 never trusts the contents of an inode
 407         * unless it's holding a cluster lock, so taking it here isn't
 408         * a correctness issue as much as it is a performance
 409         * improvement.
 410         *
 411         * There are three times when taking the lock is not a good idea:
 412         *
 413         * 1) During startup, before we have initialized the DLM.
 414         *
 415         * 2) If we are reading certain system files which never get
 416         *    cluster locks (local alloc, truncate log).
 417         *
 418         * 3) If the process doing the iget() is responsible for
 419         *    orphan dir recovery. We're holding the orphan dir lock and
 420         *    can get into a deadlock with another process on another
 421         *    node in ->delete_inode().
 422         *
 423         * #1 and #2 can be simply solved by never taking the lock
 424         * here for system files (which are the only type we read
 425         * during mount). It's a heavier approach, but our main
 426         * concern is user-accessible files anyway.
 427         *
 428         * #3 works itself out because we'll eventually take the
 429         * cluster lock before trusting anything anyway.
 430         */
 431        can_lock = !(args->fi_flags & OCFS2_FI_FLAG_SYSFILE)
 432                && !(args->fi_flags & OCFS2_FI_FLAG_ORPHAN_RECOVERY)
 433                && !ocfs2_mount_local(osb);
 434
 435        trace_ocfs2_read_locked_inode(
 436                (unsigned long long)OCFS2_I(inode)->ip_blkno, can_lock);
 437
 438        /*
 439         * To maintain backwards compatibility with older versions of
 440         * ocfs2-tools, we still store the generation value for system
 441         * files. The only ones that actually matter to userspace are
 442         * the journals, but it's easier and inexpensive to just flag
 443         * all system files similarly.
 444         */
 445        if (args->fi_flags & OCFS2_FI_FLAG_SYSFILE)
 446                generation = osb->fs_generation;
 447
 448        ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres,
 449                                  OCFS2_LOCK_TYPE_META,
 450                                  generation, inode);
 451
 452        ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres,
 453                                  OCFS2_LOCK_TYPE_OPEN,
 454                                  0, inode);
 455
 456        if (can_lock) {
 457                status = ocfs2_open_lock(inode);
 458                if (status) {
 459                        make_bad_inode(inode);
 460                        mlog_errno(status);
 461                        return status;
 462                }
 463                status = ocfs2_inode_lock(inode, NULL, 0);
 464                if (status) {
 465                        make_bad_inode(inode);
 466                        mlog_errno(status);
 467                        return status;
 468                }
 469        }
 470
 471        if (args->fi_flags & OCFS2_FI_FLAG_ORPHAN_RECOVERY) {
 472                status = ocfs2_try_open_lock(inode, 0);
 473                if (status) {
 474                        make_bad_inode(inode);
 475                        return status;
 476                }
 477        }
 478
 479        if (can_lock) {
 480                status = ocfs2_read_inode_block_full(inode, &bh,
 481                                                     OCFS2_BH_IGNORE_CACHE);
 482        } else {
 483                status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh);
 484                /*
 485                 * If buffer is in jbd, then its checksum may not have been
 486                 * computed as yet.
 487                 */
 488                if (!status && !buffer_jbd(bh))
 489                        status = ocfs2_validate_inode_block(osb->sb, bh);
 490        }
 491        if (status < 0) {
 492                mlog_errno(status);
 493                goto bail;
 494        }
 495
 496        status = -EINVAL;
 497        fe = (struct ocfs2_dinode *) bh->b_data;
 498
 499        /*
 500         * This is a code bug. Right now the caller needs to
 501         * understand whether it is asking for a system file inode or
 502         * not so the proper lock names can be built.
 503         */
 504        mlog_bug_on_msg(!!(fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) !=
 505                        !!(args->fi_flags & OCFS2_FI_FLAG_SYSFILE),
 506                        "Inode %llu: system file state is ambigous\n",
 507                        (unsigned long long)args->fi_blkno);
 508
 509        if (S_ISCHR(le16_to_cpu(fe->i_mode)) ||
 510            S_ISBLK(le16_to_cpu(fe->i_mode)))
 511                inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev));
 512
 513        ocfs2_populate_inode(inode, fe, 0);
 514
 515        BUG_ON(args->fi_blkno != le64_to_cpu(fe->i_blkno));
 516
 517        status = 0;
 518
 519bail:
 520        if (can_lock)
 521                ocfs2_inode_unlock(inode, 0);
 522
 523        if (status < 0)
 524                make_bad_inode(inode);
 525
 526        if (args && bh)
 527                brelse(bh);
 528
 529        return status;
 530}
 531
 532void ocfs2_sync_blockdev(struct super_block *sb)
 533{
 534        sync_blockdev(sb->s_bdev);
 535}
 536
 537static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,
 538                                     struct inode *inode,
 539                                     struct buffer_head *fe_bh)
 540{
 541        int status = 0;
 542        struct ocfs2_dinode *fe;
 543        handle_t *handle = NULL;
 544
 545        fe = (struct ocfs2_dinode *) fe_bh->b_data;
 546
 547        /*
 548         * This check will also skip truncate of inodes with inline
 549         * data and fast symlinks.
 550         */
 551        if (fe->i_clusters) {
 552                if (ocfs2_should_order_data(inode))
 553                        ocfs2_begin_ordered_truncate(inode, 0);
 554
 555                handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS);
 556                if (IS_ERR(handle)) {
 557                        status = PTR_ERR(handle);
 558                        handle = NULL;
 559                        mlog_errno(status);
 560                        goto out;
 561                }
 562
 563                status = ocfs2_journal_access_di(handle, INODE_CACHE(inode),
 564                                                 fe_bh,
 565                                                 OCFS2_JOURNAL_ACCESS_WRITE);
 566                if (status < 0) {
 567                        mlog_errno(status);
 568                        goto out;
 569                }
 570
 571                i_size_write(inode, 0);
 572
 573                status = ocfs2_mark_inode_dirty(handle, inode, fe_bh);
 574                if (status < 0) {
 575                        mlog_errno(status);
 576                        goto out;
 577                }
 578
 579                ocfs2_commit_trans(osb, handle);
 580                handle = NULL;
 581
 582                status = ocfs2_commit_truncate(osb, inode, fe_bh);
 583                if (status < 0) {
 584                        mlog_errno(status);
 585                        goto out;
 586                }
 587        }
 588
 589out:
 590        if (handle)
 591                ocfs2_commit_trans(osb, handle);
 592        return status;
 593}
 594
 595static int ocfs2_remove_inode(struct inode *inode,
 596                              struct buffer_head *di_bh,
 597                              struct inode *orphan_dir_inode,
 598                              struct buffer_head *orphan_dir_bh)
 599{
 600        int status;
 601        struct inode *inode_alloc_inode = NULL;
 602        struct buffer_head *inode_alloc_bh = NULL;
 603        handle_t *handle;
 604        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
 605        struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data;
 606
 607        inode_alloc_inode =
 608                ocfs2_get_system_file_inode(osb, INODE_ALLOC_SYSTEM_INODE,
 609                                            le16_to_cpu(di->i_suballoc_slot));
 610        if (!inode_alloc_inode) {
 611                status = -EEXIST;
 612                mlog_errno(status);
 613                goto bail;
 614        }
 615
 616        mutex_lock(&inode_alloc_inode->i_mutex);
 617        status = ocfs2_inode_lock(inode_alloc_inode, &inode_alloc_bh, 1);
 618        if (status < 0) {
 619                mutex_unlock(&inode_alloc_inode->i_mutex);
 620
 621                mlog_errno(status);
 622                goto bail;
 623        }
 624
 625        handle = ocfs2_start_trans(osb, OCFS2_DELETE_INODE_CREDITS +
 626                                   ocfs2_quota_trans_credits(inode->i_sb));
 627        if (IS_ERR(handle)) {
 628                status = PTR_ERR(handle);
 629                mlog_errno(status);
 630                goto bail_unlock;
 631        }
 632
 633        if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) {
 634                status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode,
 635                                          orphan_dir_bh);
 636                if (status < 0) {
 637                        mlog_errno(status);
 638                        goto bail_commit;
 639                }
 640        }
 641
 642        /* set the inodes dtime */
 643        status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
 644                                         OCFS2_JOURNAL_ACCESS_WRITE);
 645        if (status < 0) {
 646                mlog_errno(status);
 647                goto bail_commit;
 648        }
 649
 650        di->i_dtime = cpu_to_le64(CURRENT_TIME.tv_sec);
 651        di->i_flags &= cpu_to_le32(~(OCFS2_VALID_FL | OCFS2_ORPHANED_FL));
 652        ocfs2_journal_dirty(handle, di_bh);
 653
 654        ocfs2_remove_from_cache(INODE_CACHE(inode), di_bh);
 655        dquot_free_inode(inode);
 656
 657        status = ocfs2_free_dinode(handle, inode_alloc_inode,
 658                                   inode_alloc_bh, di);
 659        if (status < 0)
 660                mlog_errno(status);
 661
 662bail_commit:
 663        ocfs2_commit_trans(osb, handle);
 664bail_unlock:
 665        ocfs2_inode_unlock(inode_alloc_inode, 1);
 666        mutex_unlock(&inode_alloc_inode->i_mutex);
 667        brelse(inode_alloc_bh);
 668bail:
 669        iput(inode_alloc_inode);
 670
 671        return status;
 672}
 673
 674/*
 675 * Serialize with orphan dir recovery. If the process doing
 676 * recovery on this orphan dir does an iget() with the dir
 677 * i_mutex held, we'll deadlock here. Instead we detect this
 678 * and exit early - recovery will wipe this inode for us.
 679 */
 680static int ocfs2_check_orphan_recovery_state(struct ocfs2_super *osb,
 681                                             int slot)
 682{
 683        int ret = 0;
 684
 685        spin_lock(&osb->osb_lock);
 686        if (ocfs2_node_map_test_bit(osb, &osb->osb_recovering_orphan_dirs, slot)) {
 687                ret = -EDEADLK;
 688                goto out;
 689        }
 690        /* This signals to the orphan recovery process that it should
 691         * wait for us to handle the wipe. */
 692        osb->osb_orphan_wipes[slot]++;
 693out:
 694        spin_unlock(&osb->osb_lock);
 695        trace_ocfs2_check_orphan_recovery_state(slot, ret);
 696        return ret;
 697}
 698
 699static void ocfs2_signal_wipe_completion(struct ocfs2_super *osb,
 700                                         int slot)
 701{
 702        spin_lock(&osb->osb_lock);
 703        osb->osb_orphan_wipes[slot]--;
osb 7 di = (struct osb_orphan_wipes[slot]--;
#L698evme="ef="fs/ocfs2/inode#L698evme=704444444444         01e" na7iG3n01=7f">dief="+code=ret" class="s7="sre70);
 606
        return ocfs2_get_s7stem_70fs2/inode.c#ode for us.
href="+code=di_bh" class="sre
 595(s(struct inode *inode,
 *));
orphan_dir_bh)
<     osb_r14444444         01e" na7iG3n01fs2/inode7c#L612" id="L612" class=7line"7name="L612"> 6buffer_head *di_bh,
 6027"+code=st7tus" class="sref">status7/a>);7inode *orphan_dir_inode,
 6027""+code=o7 name="L613"> 613   7     71f="+code=OCFS2_SB" class="sref">OCFS2_SB< href="+code=handle_t" class="sref">handle_t *handle;
 604        struct ocfs2_super *;
OCFS2_SB(inode->i_sb);
 605        struct ="+coddinode *mut7x_lock *ocfs2_inode_lock<7a>( 631        }
 632
 633        if (!(OCFS2_Iinode_alloc_bh, 17;
osb_L618" id="L618"+code=INODE_ALLOC_SYSTEM_INODE" class="sref">INODE_ALLOC_SYSTEM_INODE,
ocfs2_super *(&inode_7lloc_7node->NULL;
 679osb_lock);
o"sref">ocfs2_super * 621                       status7/a>);7inode_alloc_inode);
 622   7     7      goto ;
di_bh,
 607        inode_alloc_inode =
ocfs2_7tart_7rans(n" class="8" class="lin="fs/goto o"sref">ocfs2_super *e16_to_cpu(di_bh,
                7a hre7="+code=status" class=""""""""L633" class="lime="L610"> 610        if (!inode_alloc_inode) {
 629  """"""""L633" class="li9" class="line" name="L659"> 659        if (status < 0)
status);
mlog_errno(7630                g7to  621  ;
bail_u7lock;
inode)->,  673<<<<<<<<<<<<<<<<<* deletde" cla o="saL698. We do"> * inowspanaL697"gt;o/* This signals to the orphan recover7s="sref">7rphan_dir_bh);
 614        }
di_bh,
 666         637          +code=i_mutex" LL" class="sref">NULL;
i_mutex);
status = ,
sta7us);
 629  """"""""L633" class="li9class="sref">ocfs2_inode_unlock(di_bh,
 666        ;
 639<7a>       7        }
 621  """"""""L633" class="li9" class="line" name="L659"> 659        if (status < 0)
 741mlog_errno(handle,  644    ;
7;
 655         6s href="+code=out" class=we do"> * iwhnod holding=status);
t want /ocfs2/inbeing=run 2/in ano;
sta7647                g7to  * iw"comresult "  two  recs This signals to the orphan recover7f">bail_c7mmit;
/* This signals to the orphan recover7">i_dtime7/a> = cpu_to_le64NULL;

osb_lock);
 654        cpu_to_l732 659        if (status < 0)
mlog_errno(ocfs2_r7move_from_cache( 655        dqu75ame="L646"> 6s href="+code=out" class=Rs/ocfnanys hrhindex  604        struct  6"minesref">OCFS2_I 758NULL;
 604  se="L654"> 654        di);
<7 href="fs/ocfs2/inode.                      659        if (status < 0)
 621  """"""""              mlog_errno( 76a href="fs/occccccccc;
 663         665      7 (&NULL;
 604  se="L654"> 654        inode_alloc_inode, &status = PTR_ERR(handle);
 629                mlog_errno(iput(7a hre77s2/inode.c#L630" id="L630" class="line" na7d="L670" 7lass="line" name="L670">7670 771 642        fs/ocfs> 6coun> 66eflass="line" name="L58fs/ocfs> 6coun> 66ef04" id="L604" class="line" name="L604"> 604  se="L654"> 654        status;
inode_alloc_inode, & = PTR_ERR(handle);

mlog_errno(
        return );
 642        fs/ocfsa>         604  se="L654"> 654        status =  7 and exit early - recove7y wil78cfs2_signal_wipe_completion(struct ,
handle);
inode_alloc_bh, <7ef">osb,
 611                status = -EEXIST;
 681                       7     78       return  678mmit_trans" class="sref">ocfs2_a hrcode=mlog_errno" clcode=mla hrass=rphan_wipes" class="sref">osb783" id="L783" class="line" name="L783"> 783                           ame="L631"> 631        }
 632
 633        if (!(osb78"line" n7685        inode_alloc_inode);
7sb 664status = EDEA7LK);
ocfs2_inode_unlock(di_bh,
 666         688 7     79e.c#L648" id="L648" class="le=inode_alloc_inode" class="sref">inode_alloc_ide=stai_bh"r_inode,
handle);
osb7 process 7hat it should
di_bh,
handle);
 681         697}
osb_lock);
o"sref">ocfs2_super *[ 6947/a>        inode_alloc_inode);
, r79_lock * 79" id="L677" class="line" nass="sere is a series of siid="  nameL689" iL689" mbeLdonembefore a}
ret;

is_valid" cldeletdef="+code=i_mutex" clL664">is_valid" cldeletd" class="line" name="L698">href="+code=di_bh" class="sre
osb8="sref">o8b,
 780                   8     80ine" name="L6e=orphan_dir_bh" cl=slot" class="sref">slot)
8702        i_sb);
infref="+code=statuef="fsL664">infr"sre
/* set the " class=               ame="L631"> 631        }
87s[handle_t *handle;
 604        struct ocfs2_super *osb 8 di = (struct is_valid" cldeletdef="+code=i_mut>is_valid" cldeletd04" id="L604" class=currme="ef="fs/ocfs2/icurrme=a>);
slot]dc_tasf">ocfs2_inode_udc_tasfcode=        return dief="+code=ret" class="s8="sre80                            struct sref"""""""""""(uninoded long long)a href="fs/ocfsoment">/* set the " claine" name="L632"> 632di6" class="line" name="L8"fs/o80cfs2_free_dinode(/* set the " claine" name="L632"> 632
ocfs2_super *di="sref">ret;
t beLgetaing=sere     ));
 690 642   [slot]root" class="sref">di_bh);
&inod;Skipping=deletd of roots" clas\n&inod;}
ocfs2_super *status8/a>);81ode=INODE_CACHE" clas              ocfs2_super * 613   8     81f="+code=OCFS30" id="L630" class="line" na8ss="sref"8bail;
 655        mut81ame="L646"> 6s href="+code=out" class=If 676re =ouing=2/in downconvert_t 65* recocan6t go6e=oo our own}
diocfs2_inode_lock<8a>(diinode_alloc_bh, 18;
inode_8lloc_82"L690" class="line" name="L690"> 690 642   [slot]dc_tasf">ocfs2_inode_udc_tasfcode"phan_wipes" class="sref">osb8"+code=st8tus" class="sref">status8/a>);8ocfs2_super * 622   8     8      goto ;
slot)
/* set the " claine" name="L632"> 6322ocfs2_super *ocfs2_8tart_82f="+code=ocfs2 href="+code=out" class ode.c *never* deletds _alloc inods.="sref"689" mtechnically}
 690.   }
di                8a hre82                                oment">/* set the " claine" name="L632"> 632
 629  L633" class="li9" cef="+code=status" c04" id="L604" class=ML_ERRO      if (!();
&inod;Skipping=deletd of _alloc inods6status);
/* set the " claine" name="L632"> 632ocfs2_super *8630                g8to  621                ocfs2_super *bail_u8lock;
inode)->,  * i_mutex helano. Ran class="co}
 690/* set the " claine" name="L632"> 632
osb8sref">sta8us);
ocfs2_super *        8               goto ;
cpu_to_le64slot14444444         01e" na7iG3n08a>       8        }
(osb, 8="L641" c8ass="line" name="L641"> 841osb_orphan_wipesment">/* set the " claine" name="L632"> 6322ocfs2_super *handle, osb8c#L644" i8="L644" class="line" nam8="L6484nlock" class=alloc_inode" class="srcovery_state(slo8cs="sref"8JOURNAL_ACCESS_WRITE8;
status);
;
veryrma>) whesta8647                g8to bail_c8mmit;
 672}
<8">i_dtime8/a> = cpu_to_l832
ment="+code=handle_t" claqulas=L664">ment" class="line" name="L698">href="+code=di_bh" class="sre
inode *inode,
osb8">ocfs2_r8move_from_cache(orphan_dir_bh)
)5" id="L695" class=as/a>}
dqu85ame="L646"> 6sref">i_sb);
infref="+code=statuef="fsL664">infr"sre
/* set the " class=               ame="L631"> 631        }
OCFS2_SB(inode->sta8ass="line" name="L658"> 858di);
<8 href="fs/ocfsf="+code=inode" ment="+code=handle_ment" cl/a>)
 639<8 ment_begia>}
ment_begia/* set the " claine" name="L632"> 632 86a href="fs/occccccccccccccccccccccccccccccccccccd="L604" class="line" name="L604"> 604        struct  663          ing=2    665      8 ;
veletd04 690;
catceria* me  }
(is_valid" cldeletdef="+code=i_mutex" clL664">is_valid" cldeletd" claef="fs/ocfs2/inode.c#L632" id="L632" class="l/OCFS2_Istatus}
 629                ocfs2_super *iput(8a hre87s2/inode.c#L630" id="L630" class="line" na8d="L670" 8lass="line" name="L670">8670 871;
vats=" cla, ecocan doub="  name}
status;
 690.   }

ocfs2_super *


i_sb);
 605        struct ="+coddinode * 8 and exit early - recove8y wil88cfs2_signal_wode_1" class="line" nSYSTEM_INODE,
    cfs2/icpu" clle63" claef="fs/ocfs2/in     }I" claED_Fe.c#L602" id="L6     }I" claED_Fess="l/O" id=" id= */* set the " claine" name="L632"> 632
OCFS2_Iosb,
 611< href="+code=out" class}
 681                       8     88     " id="L675" class="line<<<<<<<<<<<<<<<<* I claef"  ta href="fs hrhmull havcaI" claED_Fe.  Ta honly}
 6884ef="6" id="L676" class="lin90"> 690<<<<<<<<* " claefp9" icome bame out"of">  href="fs hrhar"mref#L6sss 88ass="line" name="L673"> 673<<<<<<<<<<<<<<<<<* target meAmref#L6s target maymbeLmoved out"of">  href="fss        8sb 690<<<<<<<<* process=i>. "srefw89" ml5* r   HAS_REFCOUNT_Fenbeing=set but}
EDEA8LK 688 8     89href="fs/ocfs2/inode.                   SYSTEM_INODE,
;
OCFS2_I2= * 621  """"""""              ocfs2_super * 681         6948/a>        (orphan_dir_bh)
href="+code=inode_alloc_inode" class="sref">inode_alloc_inode) {
, r89cfs2/inode.c#L636" idL633" class="li9" cef="+code=status" c04" id="L604" class=ML_ERRO      if (!();
e_alloc_inode) {
 89cfs2_free_dinode(&inod;I clas6) {
ret;
&inod;Disk ode.c  0x6/* set the " claine" name="L632"> 632o9b,
,
o9bat it should
 621  """""a href="fs/ocfsle32e=INODE_ALLOC_SYSTEM_INO32e=INODE04" id="L604" class=SYSTEM_INODE,
/* set the " claine" name="L632"> 632
ocfs2_super *9702        ocfs2_super *97s[osb 9 di = (struct dief="+code=ret" class="s9="sre90                                SYSTEM_INODE,
di6" class="line" name="L9"fs/o90cfs2_free_dinode(phan_dir_bh" class="sref">orphan_dir_bh)
href="+code=inode_alloc_inode" class="sref">inode_alloc_inode) {
di="sref">ret;
status = PTR_ERR(handle);
 629                ocfs2_super *));
status9/a>);914ef="6" id="L676" class="lin90"> 690)s whe 613   9     91ass="line" name="L673"> 673<<<<<<<<<* * Se"  ta hclullor. Eclassmutexpakes a shardd 65* rslot ofss;
mut91c#L676" id="L676" class="lin90"> 690;
convert it6sssdiocfs2_inode_lock<9a>(diinode_alloc_bh, 19;
  hupconvert succeeds, ecoknowspa hmmutessinode_9lloc_92"L690" class="line" name="L690"> 690 690 * iw"Seriae meta
vataaslotL676",riaewe'll deadlock here. Instead we9es2/inode9tus" class="sref">status9/a>);92     " id="L675" class="line<<<<<<< 622   9     924ef="6" id="L676" class="lin90"> 690< }
;
NULL;
ocfs2_9tart_92f="+code=ocfs                     href="+code=inodeAGAINc_inode" class="AGAIN#L63"OCFS2_Iorphan_dir_bh)
)/inode.c#L665" id="L665" clas9s8f">di(phan_dir_bh" cls=as/a>}
di                9a hre92.c#L638" id="L638" cl              ocfs2_super * 630" id="L630" class="line" na9 class="s9ef">status);
9630                g9to  621  "sref">status = PTR_ERR(handle);
bail_u9lock;
ocfs2_super *inode)->, 14444444         01e" na7iG3n09sref="+co9rphan_dir_bh);
ment_succ="+code=handle_>ment_succ"sref">PTR_ERR(,
4444444         01e" na7iG3n09s8f">di        return sta9us);
osb9>        9               goto ment_en" class="sref">i>ment_en""sref">PTR_ERR(}
;
inode_alloc_inode);
       9        }
 941handle,  673<* " cla dataain a consists=" ex helcleare" cla. Always "L581" csss9;
href="+code=di_bh" class="sre
status);
(="+coaync" clalot<>        return sta9647                g9to bail_c9mmit;
 631        }
 632="+coaync" clalot<>href="fs/ocfs2/inode.c#L670" 9cpu_to_le92" class="sref">cpu_to_l932="+coaync" clalot<>        return ="+coinodmap_writdeand_a>  href="fs/ocfs2/inode.c#L670" 9cdle" cla9pagesef="+code=i_mut&g581" c=L664">pagesosb_orphan_wipes="+coi" clalot<,ss=href="fs/ocfs2/inode.c#L670" 9c#L644" i9move_from_cache( 655        dqu95_lockthis invoidf="fs/ocfs2/inode.c#L5leletde" claef="+code=i_mutex" clleletde" cla"srefss="line" name="L698">href="+code=di_bh" class="sre
        return sta9ass="line" name="L658"> 958inode_alloc_inode);
di);
<96e.c#L648" id="L648" class="linoset_ ss="sref">="+coinoset_ .c#L6="fs/ocfs2/inodeldsovery_state((struct inode *inode,
 96a href="fs/oc"L648" class="l> 663         631        }
 632 632s_bade" claef="+code=i_mut2s_bade" cla 665      9  655         6s href="+code=out" class=Whenawd failain 65* /" cla()fecomark " cla as bad. Ta hsecon mtest}
sta9e=inode_alloc_bh" class=9sref"96.c#L678" id="L678" class="limmmmmmmm* a blass= hel" cla.   }
 632s_bade" claef="+code=i_mut2s_bade" cla 631        }
 632        return iput(9a hre97check_orphan_recovery              ocfs2_super *9670 971inodeocfs2_super * 663status;
(is_valid" cldeletdef="+code=i_mutex" clL664">is_valid" cldeletd" claef="fs/ocfs2/inode.c#L632" id="L632" class="l/OCFS2_I
s probably  rt necessaasspages
 690<<<<<<<<* sere bu i67 do it= helsaf ty/anyway (it=="commost}
sta9s
status 9 and exit early - recove9y wil98ame="L629"> 629                ocfs2_super *osb,
 681                       9     98nt    blass=inode.ef"  leletde" cla as  6984ef="6" id="L676" class="lin90"> 690* messaging=paths maymalloc_ius -ERESTARTSYS. Whichfw89" "s 98ass="line" name="L673"> 673<<<<<<<<<* caus) us >;
exit=early,malsul ing=in " claefbeing=de=staed"s        9sb(&osb_orphan_wipes(        return EDEA9LK 688 9     99e.c#L78" id="L678" class="limmmmmmmm* Synchronizd us against ode" cgetclentry. We/pake"> * i_m}
 690
 690 681        [NULL;
 604        struct  6949/a>        NULL;
();
&inod;getaing=nfs synch#ass(PR) faildd 6NULL;
r99cfs2/inode.c#L636" idL633" class="lie.c#L5cleanupcleletde" claef="+code=i_mutex" clcleanupcleletde" cla"srefef="fs/ocfs2/inode.c#L632" id="L632" class="=os=href="fs/ocfs2/inode.c#L670" 9 99cfs2_free_dinode(              ocfs2_super *ret;
ret;
10fsa href="fs/oc href="+code=out" class Lass=down/;
vats=view of}
;signb0/fb/afaf5f739f25581e00640b163c8d4784e887_3/10fs2>" id="L630" class="line" na10f12_signa10fref="fs/ocfs2/inode.c#L10fre>10f"L690" class="line" name="L690"> 690s metadataa( helverificaL698),aandoallows us >;}

10f~( 690        10f4ef="6" id="L676" class="lin90"> 690* Eve  taough=ecomightsba doing=a &g581" c,i67 don6t pake"> ewe'll deadlock here. Instead we10f52_signa10fa>         673<<<<<<<<<* allocaL698 slotL67re as it==on6t beLneeddd -h cbodss="co}
10f#L675" id="L675" class="line<<<<<<< 690< }
10f8de=INODE_CAC"L648" class="leL" class="sref">NULL;
a href="+code=i_mutex" clL664">a hr"srefef="fs/ocfs2/inode.c#L632" id="L632" class="=o>osb_orphan_wipesinode,
ret;
NULL;
10  fs2_free_dinode(                   eL" class="sref">NULL;
href="+code=inodeNOENoc_inode" class="NOENocode>        return 10 check_orphan_recovery_statePTR_ERR(handle);
10 ame="L621"> 621  "sref">status10 a href="fs/occccccccc              (ocfs2_super *status10tus>10 a href="fs/ocfs2/inode.c#L613" id="L613" c10 52_signa10 name="L613"> 613   10 na>10      goto ;
 690 *ocfs2_inode_lock<10"sr>10 8de=INODE_CAC"L648" class="leL" class="sref">NULL;
ment="+code=handle_t" claqulas=L664">ment" claef="fs/ocfs2/inode.c#L632" id="L632" class="=oorphan_wipesinode,
osb_orphan_wipesocfs2_super *inode_alloc_bh, 110f">>10                  to_cpu(NULL;
10tens(inode_10ode>10t"L690" class="line" name="L690"> 69090"> 69010t~( 69090"> 690status10tus>10ta href="fs/occccccccc                   eL" class="sref">NULL;
 622   10 na>10tode=INODE_CACHE" classsssssssL633" class="lia> = PTR_ERR(handle);
10t     goto ocfs2_10ans>10tans(10tc#L676" id="L676" class="lin90"> 690<<<<<<<<* > * i_mute, or it==as nevericompletdly}
                10 62>10t"+code=status" class="sref">status10c# href="fs/occccccccc              ocfs2_super *status);
10cs2/inode.c#L630" id="L630" class="line" na10c22_signa10630                g10630>10cref="+code=bail_unlock" class="sr10c32_signa10lock;
inode)->10c     goto , NULL;
inode,
10cf="+code=ocfs                     NULL;
href="+code=inodeDEADLKc_inode" class="DEADLKcode>        return 10ccfs2_free_dinode(PTR_ERR(handle);
10c.c#L638" id="L638" cl              ocfs2_super *10  2/inode.c#L630" id="L630" class="line" na10412_signa10="fs/ocfs2/inode.c#L639"10="f>10 9" class="line" name="L639"> 639<10 22_signa10        }
 10ass>10      " id="L675" class="line<<<<<<<handle,  690*we'll deadlock here. Instead we10 52_signa10="L644" class="line" nam10="L>10 ass="line" name="L673"> 673<<<<<<<<<* "srefrefimport>nt 2   ode" ccleare" cla() as it=="comcname}
10JOU>10 #L675" id="L675" class="line<<<<<<<<*=10 c#L676" id="L676" class="lin90"> 690<}
status);
10 " id="L677" class="line" nammmmmmmmm* ode" cstuff_meta_lvb() also usess                g10647>10 .c#L678" id="L678" class="limmmmmmmm* ;
 690< }
 =  631        }
 632
 631        }
ode=ODELETEDass=sref">ocfs2_super *cpu_to_l102" >10mref="+code=bail_unlock" class="sr10532_signa10   osb10m42_signa1010mode=INODE_CAC"L648" class="lex" clL664">lass="ef="+code=i_mutex" clL664">lass=""srefef="fs/ocfs2/inode.c#L632" id="L632" class="=os2/inode.c#L665" id="L665" clas10552_signa10move_from_cache(10me.c#L623" id=node" class="srbrelsc#L632" id="L632frelsc"srefef="fs/ocfs2/inclass="sref">inode,
inode *osb10m42_signa10ass>10      " id="L88(1ocfs2/inode.c#L641" i9class="li9e" name="Lalloc_bh"=a>href="+code=u95_lockthis invoidf="fs9a hre92.c#L638" id="L638" cl      uu3de,
i ccl=> cclligna1>10m class="sref">in cc0"> 690< }
 cc2ligna1>10m class="sref"fs/o996" class="lin"L99 sofp9 622<#L665" id=/inode.c#L6 * cc g10630>10cre2" clade_alloc_inodeex" clblass/ino cca href="+c"f="fs/ocfs2/inode.c#L6i+c"f=> ccass="s=sref">ocfs2_super * 632 ccdle" class="sref">handle);
 ccode.   }
href="+code=di ccc#L670" 100" 9="line" n9me="L665">100" > cc"lignc#L635" i10fs/>10cf="+code=ocfs6 cca"srefss="lincod9 class="s9ef">st58"> 958 ccdle" class="sth8s
,  =  c78le" class="sref">handle);
 632 c70"> 690< }
>10m1.c#L623" id=nodephan_dir_bh" clment="+code=ha c7 ame="L6odery               c72"> 690< }
;
/* set the c7 *osb10m42_signa10ass>10      " id="L88(1ocfs2/inode.c#L641" i9n" 9"fs/o996" class=i9n" 9"=nodephan_dir_bh" clment="+code=ha c7a href="+c 663statefhre> c732" class="=os2/inode.c#L665ass="bug_on_ms class="9c"line" n9e"bug_on_ms fssosb10m42_signa10ass>10      " id="L88(1ocfs2/inode.c#L641" i9class="li9e" name="Lalloc_clas/inode.c#L641" ss="sref">inode */* set the c732frelsc"sclaef="fs/ocfs2/inode.c#"scla> c7oc10bai>10t     goto lass="=osinode) {
);
10      " id="L88(1ocfs2/inode.c#L641" i9i href=leletde" cla"sreforpephan_dir_bh" clment="+code=ha c7c#L670" 10obably  rt necessaass c772" class="=os=href="fs/ocfs2/inode7 c7a"srefss="line" name="L69to ss="lidroph10mov>10me.c#L6s="lidropass="  c73de,
1 i76" id="L676" class="lin90"> 690<<<< cefs/oc10mmi>                  > ce4784e887_3/10fs2>" id="L630" class="lins id="Lto la"sre PR62_siEX9ss="sref"s0t" id="L677" class="line" nammmmmmmmm<<<8 ame="L6od=ipu9overy_state" class=od=ip> ce2"> 690< }
osb,
 cefs/oc9s2/in94log_efs2/inode.c#L61 cea href="+class=inode.ef"  leletde"+clas> ce4"10="f>10 9" class="line" name="L639 D="srese9line"96" iL641"signa1TE10f4efbouncd="L677" class="line" nammmmmmmmm* ode8ass=""srefaths maymalloc_ius -ERESefath> ce90"> 690*we'll deadlock here. Inst641"a10fode_alloth    9wh2_si hreigna1oni9
 ce6"> 690< }
   ce 2  ever.   }
   cea"srefss="line" name="L69to    ce3de,
osb10m42_signa10ass>10      " id="L88(1ocfs2/inode.c#L641" i9class="li9e" name="Lalloc_ocfs2/inode.c#L641" osb_latresmaph10mov>10me.c#Losb_latresmap hreref="fs/ocfsoment">/* set the c9fs/oc10mmius against ode" cgetclenmius > cLlass="NOENocode>        returrrr/a98nlock(& cL2"> 690< }
;
 610="L> cLfs/oc9s2/in94log_efs2/inode.c#L61 c9a href="+c=osb99     " id="L675" c+c=os> cL4"10="f>10 9" class="line" name="L639 We name=we97c#ay.c#L6a n95er2_sign9line"96" iL>status9 href="+cod2 href="+code=out" class  cLass=""sref    struct  690*we'll deadlock here. Inst12_signa1srefhitf">ok. Of course=sl10ca<>10f4efdrop0JOURNclass=href="+cod2 href="+code=out" class  cL32frelsc"s" class="leL" class="sre"s" c> cL"comcname}
ocfsuntiiL641"jourfs/osreffne"shed9c#L62itx96ameon0+co>10tc#L676" id="L676" class="lin90"9c#L670" 10r=C"L648" class="leL" cl10r=C> cLs698 matess 690<}
syassmhref="+cod2 href="+code=out" class  cLdf="fs9a h  6itfc_co0t" id="L677" class="line" nammmmmmmmm<<1hre9<"+cod1=E9s="sref">ret;
 =  631        }
 632
href="+code=di 1do/a>;sign10/fb/afaf5f739f25581e00641b163c10lass="NOENocode>     href="fs/ocfs2/inode.cAL_ACCESS2_signa10lock;
ocfs2_super 6901/serializd leletde" cla o1 mul 10 g10630>10cref="+code=bail_uass="bug_on_ms class="9c"line" n9e"bug_on_ms fssocfs2_super(&ocfs2_super 6901/osb99     " id="L675" c+1s="li10a>;
) {
ocfs2_super 6901/   struct  6901/ class="leL" class="sre"1dd -h10ode,
;
10mode=INODE_CAC"L648" class="lex" clL664">"=a>href="+code=u95_lockthis inv1ass="s10fe1>10fc#L676" id="L676" cla1s="li10e(ino1e,
st58"> 958, >10m1.c#L623" id=nodephan_dir_bh" clment="+code=ha 1          1        eL" class="sref">1ULLstatus10tus>10ta href="fs/occcccc1a>;
href="+code=inodeNOENoc_1node"1class="NOENocode>     f="+code=bail_uass="_signa10id="L637" class="line" n10id=>10ccfs2_free_dinode(PTR_ERR(ocfs2_super10cref="+code=bail_unlock"ame=#res_free92code=dqu9+code=osb"ame=#res_freess="s/a98nlock(&1(&statu110tus1132" class="=os2/inode.c#L665class=ame=#res_free92code=dqu9+code=osb"ame=#res_freess="s/a98nlock(& 113,
  10ccfs2_free>
  
>10m1.c#L623" id=nodeephan_dir_bh" clment="+code=ha 1=ss="s10fe1/before 67 go a> *(,
osb_orphan_wipes,
sass="bug_on_ms class="9c"line" n9e"bug_on_ms fss
  
>10m1.c#L623" id=noderef"90cfs2_signal_wici_num_ca"AL" 9 ;
/* set the 1/||C"L648"1class="leL" class="sref">1ULL;
) {
ocfs2_super        retur return /* set the 1690han
s>
  
>10m1.c#L623" id=noderef"90cfs2_signal_wici_num_ca"AL" 9 ;
 69091"> 6912fs/oc9s2/in94log_efs2/inode.c#L61 1cc        1          eL" class="sref1>NULL12ass="lode.cass=rphan_wipes" ass="bug_on_ms class="9c"line" n9e"bug_on_ms fss
  
>10m1.c#L623" id=noderef"90cfs2_signal_wici_631        }
ocfs2_superPTR_ERR(ocfs2_super;
 690<<<<<1<<* > * i_mute, or it==as1never12a"srefss="line" name="L69to ass="bug_on_ms class="9c"line" n9e"bug_on_ms fssocfs2_super,
ocfs2_superstatus);
 690< }
ocfs2_super(&ocfs2_super       1     13/path. < }
ocfs2_super;
inode10c     goto (&13ode,
 655      id="L677" class="line" nammmmmmmmm<<1;
1ref="+code=inodeDEADLKc_i1ode" 1390"> 690<}
,
PTR_ERR(;
 690< }
ocfs2_super(&ocfs2_superhan
) {
ocfs2_super10 /ocfs2/inode.c href=1+code14/path. < }
10 4ef="6" id="L676" cl1ss="l14dle" class="sref">handle);
1t 2   ode" ccleare" cla()1as it146"> 690< }
  /* set the 1ne<<<<<<<<1=) {
/* set the 1n
1L>10 c#L676" id="L676" cl1ss="l14ass="DEADLKcode>        retur return   10mm#L676" id="L676" cla1s="li190"> 690< }
        }
 631   1    }152"> 690< }
10me.c#Lpe_dir_start_lookup/ocfs= 0phan_dir_bh" clment="+code=ha 1 "fs/oc10 1522_signa102" class="sref1>cpu_15 g10630>10cref="+code=bail_une_completion" class=9sref"90cfs2_signal_wipe_completio(uninoded long long)a hs= 0ULLphan_dir_bh" clment="+code=ha 1 ine<<<<<<1lass="lode.c#L632" id="L612f="+1532" class="=os=href="fs/ocfs2/inod1lass=""sre1ef="fs/ocfs2/inode.c#L6321 id="1632" class="=ose="L655"> 655      id="L677" class="line" nammmmmmmmm<<1632frelsc"1refef="fs/ocfs2/inclass="1ref">15"comcname}
 ensuree=ipuid="L677" class="line" nammmmmmmmm<<16e<<<<<<<<1562_signa10L655" id="L6551 clas15s698 matess 690 690<}
 690,
i 1cl=> 16K"srefss="line" name="L69to jbd2_jourfs/_refs/se_jbd2_signa10lock;
osb10m42_signa10ass>10      " id="L88(1ocfs2/inode.c#L641" i9class="li9e" name="Lalloc_ocfs2/inode.c#L641" jourfs/a10lock;
;
/* set the 16fs/oc10mm1c#L6="fs/ocfs2/inodeldsom1c#L> 16lass="NOENocode>        returrrrrrrrrrrrrrrr/a98nlock(&10      " ie_jigna1)a h_phan_dir_bh" clment="+code=ha 1c ame="L6o1ocfs2_super * 16fs/oc9s2/in94log_efs2/inode.c#L61 1ca href="+1"f="fs/ocfs2/inode.c#L6i+1"f=> 1cass="}
href="+code=di 16ass=""sre1name="L632"> 632 1cdle" c#L635" i10fs/>10cf="+code=ocf1632frelsc"1a href="fs/ocfs2/inode.c"1a h> 16ode,
ocfs2_super10      " id="L88(1ocfs2/inode.c#L641" i9n" 9"fs/o996" class=i9n" 9"=nod ||#L635" i10fs/>10cf="+code=ocf16e<<<<<<<<10" 9="line" n9me="L665">110" > 16loc_bh" class=OCFa r  recs we'll de.c#L641" i10512_signa10/a> =  631        }
 632
10cf="+code=ocf16 16ass="DEADLKcode>     href="fs/ocfs2/inode.sr10c32_signa10lock;
10ca href="fs/oc"L648" class="le.c#L5cleanupcleletde" cla_phan_dir_bh" clment="+code=ha 1c>,
 1cdle" class="s} igna.c#L635" i10fs/>10cf="+code=ocf17d="L678" 178" class="limmmmmmmm* a 178"> 17;
href="+code=u95_lockthis inv17fs/oc10mm1name="L632"> 632 17ass="lode.cass=sref">ocfs2_super * 690< }
;
ocfs2_super * 1732" class="=os=href="fs/ocfs2/inod17ass=""sre1hre9d"> 663state1hre> 1790"> 690*we'll deadlock39 CalERROunder641" i_lss=,9c#L62no me"96"=oerenc="Lon id="L676" class="lin90"> 690* Eve  taou1732frelsc"1claef="fs/ocfs2/inode.c#"1cla> 17"comcname}
 690* Eve  taou17e<<<<<<<<1obably  rt necessaass 17s698 matess 17a"srecod9 class="s9ef">se=osb"dropgcode=a10lock;
href="+code=di 17df="fs9a 1mmmmmm<<<<<<<<* lik lyrb 1mmm> 173de10cf="+code=ocf18d="L678" 1efef="fs/ocfs2/inode.c#L 1efe> 1ef"10="f>10 9"th8s
,  = sresetio(uninoded lres=nodphan_dir_bh" clment="+code=ha 1e ame="L6o1=ipu9overy_state" class=o1=ip> 18de=ODELETEDass=sref">ocfs2_superosb,
 18 g10630>10cref="+code=bail_u="fs/oc9s2/idropgcode=a10lock;
 = return /* set the 1ea href="+1lass=inode.ef"  leletde"+1las> 18a>;
10cref="+code=bail_uigna10ass>10      " id="L88(1ocfs2/inode.c#L641" i9n" 9"fs/o996" class=i9n" 9"=nodr}
        }
 18dle" class="sref">handle);
 18ode,
        }
 632
handle);
 18loc_bh" class=OCFS2_I class="s9ef">sresetio(uninoded lres=nodb 1ea"srefss="linignahan_dir_bh" clment="+code=ha 1edf="fs9a 10" 9o="+code=9fs2/inode. 10" > 18t=now. < }
>10m1.c#L623" id=nodephan_dir_bh" clment="+code=ha 19d="L678" 1LKhandle);
 1Llass="NOENoco2" cla9 class="s9ef">sresetio(uninoded lres=nodphan_dir_bh" clment="+code=ha 19 ame="L6o1cla sofp9" iacom claefcao1cla> 192ligns=sref">ocfs2_super * 611="L> 1Lfs/oc9s2/in94log_efs2/inode.c#L61 19a href="+1=osb99     " id="L675" c+1=os> 19 deletdd we'll deadlock  id="L677" class="line" nammmmmmmmm<<1Lass=""sre1    struct  690*we'll deadlock stead we10calERROfe9tuourLc#Lattrx690" class="line" name="L690"> 690 1L"comcname}
 1Ls698 cod9 class="s9ef">se=osb"code=hre>10 " ida10id="L637" cls/ocf8code=hre>10 " idss="s95_lockthis invoidf="fd/ocryclass="9c"line"d/ocry" claef="+code=i_muted/ocryclass="9c"line"d/ocry" cleclass="sref">handle);
 c#L635" i10fs/>10cf="+code=ocf1Ldf="fs9a 1 ;
ret;
st58"> 958s me2adataa( helverificaL698),2andoa202"> 690< }
10 " ida10id="L637" cl="fs/oc9s2/icode=hre>10 " id/a> = /* set the 2in90"> 6902/serializd leletde" cla o2 mul 20/path. < }
 =  completio(uninoded long long)a hs: 0ULLref="fs/ocfsoment">/* set the 2i490"> 6902/osb99     " id="L675" c+2s="li20a>;
 =  631        }
href="+code=u95_lockthis inv2i590"> 6902/   struct handle);
 6902/ class="leL" class="sre"2dd -h20ode,
ocfs2_super10      " id="L88(1e.c#L635" i10fs/>10cf="+code=ocf25" id="L672" class="line<<<<<<<st58"> 95810ccfNOENT958ino2e,
ocfs2_super *2ULLhandle);
;
href="+code=inodeNOENoc_2node"210"> 690< }
(&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 2 class="sr2f">PTR_ERR( =  631        }
 632
10cf="+code=ocf2e" cla"sre2ef="fs/ocfs2/inode.c#L6322 id="21/path. < }
(&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 2 490"> 6902lnfs_aynccommit_trans2;
 95810ccfNOENT958statu210tus2132" class="=ode>     dle);
 213,
ocfs2_super *(&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 2 8 id="L672/before 67 go a> *(,
osb_orphan_wipes,
2ULL 690< }
 958, 10mode=INODE_CAC"L648" class="lex" clL664">a >10mode=INODEss="sref">inode *href="+code=u95_lockthis inv2690,
stat.c#L635" i10fs/>10cf="+code=ocf2( 69092"> 6922/path. < }
handle);
10ccass="_signa10id="L637" class="line" n10id=>10ccfs2_free_dinode(PTR_ERR(;
ocfs2_super *10mode=INODE_CAC"L648" class="lex" clL664">"=a>href="+code=u95_lockthis inv268 id="L672<<* > * i_mute, or it==as2never22a"srea>);
,
st58"> 958ocfs2_super *status);
 6tdd we'll deadlock  id="L677" class="line" nammmmmmmmm<<2"line" na12c22_signa10630       2     23/path690*we'll deadlock stUp" ieefam">ok641" i9 e9tuaid="L677" class="line" nammmmmmmmm<<2"c        2ef="fs/ocfs2/inode.c#L6322 id="23 deletdd we'll deadlock2*sth8s 690inode 690*we'll deadlock stOnly takeefpe_lss=x690" class="line" name="L690"> 69023"comcname}
se=osb"clasLcode=hdirtyclass="9c"line"e=osb"clasLcode=hdirty c1010mode=INODEhandle_fitdeand_a>  /* set the 2;
2ref="+code=inodeDEADLKc_i2ode" 23ass="DEADLKcode>        retur "sth8s
/* set the 2;>,
PTR_ERR(
handle);
10cf="+code=ocf2104s2_sign210               goto st58"> 958
10 /ocfs2/inode.c href=2+code24fs/oc9s2/in94log_efs2/inode.c#L61 2line<<<<<<2 =  completio(uninoded long long)a hephan_dir_bh" clment="+code=ha 2lclass="sr2">10 4ef="6" id="L676" cl2ss="l24dle" class="sref">handle);
2t 2   ode" ccleare" cla()2as it246"> 690< }
 958, s>
  
>10m1.c#L623" id=nodero class="s9ef">sbh 9 ;
/* set the 2ne<<<<<<<<2=  stat.c#L635" i10fs/>10cf="+code=ocf2l>,
10ccfs2_free_dinode(>10m1.c#L62leav1)a hphan_dir_bh" clment="+code=ha 2"fs/oc10mm2>10mm#L676" id="L676" cla2s="li25ass="lode.cass=sref">ocfs2_super * 631   2    }25de=ODELETEDass=sref">ocfs2_supercpu_25 g10630>10cref="+code=bail_uspin7lss=class="9c"line"spin7lss=ss="s/a98nlock(&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 2 ine<<<<<<2lass="lode.c#L632" id="L622f="+25ass="lode.cass=rphan_wipes" flleletde" cla"srf="linocfs2/inode.c#L641" i9Nclass=/a>        }
, statu }
 =  =  Nclass=/a>        }
        }
 =  = 256"> 690< }
        }
, statu }
 =  =  attra>        }
,  =  dyn_fe3" resetio(uninoded lop9dyn_fe3" res =or_phan_dir_bh" clment="+code=ha 2 
2de=9andle93     goto (&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 25>,
,
i 2cl=> 26K"srefss="line" name="L69to flleletde" cla"srf="linocfs2/inode.c#L641" i9siz10/a>>10m1.c#L6239siz1 =orb,  =  260"> 690< }
   = s=cpu10/a>>10m1.c#L623" id=nodocfs2/inode.c#L641" i9n" 9"fs/o996" class=i9n" 9"=nod_phan_dir_bh" clment="+code=ha 26 ame="L6o2 690< }
, statu }
 =  26 g10630>10cref="+code=bail_uflleletde" cla"srf="linocfs2/inode.c#L641" i9gi" 9 ;
, statu }
 =  26ass="lode.cass=rphan_wipes" flleletde" cla"srf="linocfs2/inode.c#L641" i9mpu10/a>>10m1.c#L6239mpu1 =orb, >10m1.c#L623" id=nodocfs2/inode.c#L641" i9mpu10/a>>10m1.c#L6239mpu1 =or_phan_dir_bh" clment="+code=ha 26class="sr2name="L632"> 632 2632" class="=os>, >10m1.c#L6239atim1 =orb, >10m1.c#L6239atim1 =or.s=rphan_wipes" =v0seca10lock;
 266"> 690< }
;
, statu }
 = >10m1.c#L6239atim1 =or.s=rphan_wipes" =v0nseca10lock;
120" > 26 2  ever.   }
>10m1.c#L6239ctim1 =orb, >10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0seca10lock;
 26a"srefss="line" name="L69to flleletde" cla"srf="linocfs2/inode.c#L641" i9ctim1_nseca10lock;
, statu }
 = >10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0nseca10lock;
>10m1.c#L6239mtim1 =orb, >10m1.c#L6239mtim1 =or.s=rphan_wipes" =v0seca10lock;
 27K"srefss="line" name="L69to flleletde" cla"srf="linocfs2/inode.c#L641" i9mtim1_nseca10lock;
, statu }
 = >10m1.c#L6239mtim1 =or.s=rphan_wipes" =v0nseca10lock;
 632 270  2/inode.c#L630" id="L630" class27 ame="L6o2ery               272"> 690< }
10mode=INODEhandleitdeand_a>  sbh 9 ;
>10m1.c#L62leav1)a h sofp9 622<#L665" id=/inode.c#27a href="+2st58"> 958 663state2hre> 2790"> s=sref">ocfs2_super * 27ode,
 27s698 matess 2790"> 690<}
,
 27nvalidatd04ok641" ix690" class="line" name="L690"> 690 28 r  recs we'll deadlock #La1eefno i/o, only takeefpe_lss=x690" class="line" name="L690"> 690                  > 28ass="name}
 28de=OD}
;

/* set the 28 *osb,
 28/path. < }
handle);
 28a>;
10cf="+code=ocf2eass=""sre2aths maymalloc_ius -ERESe2ath> 2832" class="=os>, (&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 2832frelsc"2it=early,malsul ing=in ""2it=> 28ode,
 28 2  ever.   }
 =  Nclass=/a>        }
,         }
 28a"srefss="line" name="L69to ;ll de.c#L641" i10512_signa10/a> =  attra>        }
,         }
 28dle" class="ss=rphan_wipes" ;ll de.c#L641" i10512_signa10/a> =  dyn_fe3" resetio(uninoded lop9dyn_fe3" res =orb, >10m1.c#L623" id=nodephan_dir_bh" clment="+code=ha 29fs/oc10mm2us against ode" cgetclenm2us > 290"> 690< }
>10m1.c#L623" id=nodro class="s9ef">sleca_to_cpu0/a>>10m1.c#L62leca_to_cpu/a> = >10m1.c#L6239siz1 =ore_phan_dir_bh" clment="+code=ha 29 ame="L6o2cla sofp9" iacom claefcao2cla> 292"> 690< }
 = sinode.="ad2" 9"sscounfitdeand_a>   =  612="L> 29 g10630>10cref="+code=bail_u=cpu10/a>>10m1.c#L623" id=nodocfs2/inode.c#L641" i9ui" 9 ;
,  29ass="lode.cass=rphan_wipes" =cpu10/a>>10m1.c#L623" id=nodocfs2/inode.c#L641" i9gi" 9 ;
, >10m1.c#L623" id=nodocfs2/inode.c#L641" i9mpu10/a>>10m1.c#L6239mpu1 =orb, >10m1.c#L6239mpu1 =or_phan_dir_bh" clment="+code=ha 2L32frelsc"2" class="leL" class="sre"2" c> 29ode,
>10m1.c#L62S_ISLNK/a> = >10m1.c#L6239mpu1 =or_s/a98n/a98ninode.c#L632" idle10_to_cpu0/a>>10m1.c#L62le10_to_cpu/a> =         }
handle);
 29loc_bh" class=OCFS2_I class="s9ef">s=cpu10/a>>10m1.c#L623" id=nodocfs2/inode.c#L641" i9b  98sa>        }
>10m1.c#L623" id=nodocfs2/inode.c#L641" i9b  98sa>        }
sinode._sign sectorscounfitdeand_a>   = ret;
>10m1.c#L6239atim1 =or.s=rphan_wipes" =v0seca10lock;
, >10m1.c#L6239atim1 =orephan_dir_bh" clment="+code=ha 3h1e9<"+cod3=s against ode" cgetclenm3b163c300"> 690< }
>10m1.c#L6239atim1 =or.s=rphan_wipes" =v0nseca10lock;
, ;
 690< }
>10m1.c#L6239mtim1 =or.s=rphan_wipes" =v0seca10lock;
, >10m1.c#L6239mtim1 =orephan_dir_bh" clment="+code=ha 3h3e9<"+cod3="L676" class="lin90"> 613 mul 30 g10630>10cref="+code=bail_u=cpu10/a>>10m1.c#L623" id=nodocfs2/inode.c#L641" i9mtim10/a>>10m1.c#L6239mtim1 =or.s=rphan_wipes" =v0nseca10lock;
, ;
>10m1.c#L623" id=nodocfs2/inode.c#L641" i9ctim10/a>>10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0seca10lock;
, >10m1.c#L6239ctim1 =orephan_dir_bh" clment="+code=ha 3h5e9<"+cod3=   struct >10m1.c#L623" id=nodocfs2/inode.c#L641" i9ctim10/a>>10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0nseca10lock;
, ;
,
(&<;ll de.c#L641" i10512_signa10/a> =  lss="line" name="L6pe_lss=lloc_phan_dir_bh" clment="+code=ha 3h8 id="L673"fef="fs/ocfs2/inode.c#Lc3s="li30ass="s=sref">ocfs2_super *ino303de,
3ULLse=osb">10 " id0_sign bsb10m42_signa10 =th8s
/* set the 3a>;
href="+code=inodeNOENoc_3node"31lass="NOENocode>        returrrrrrrrpes" =v0nseca10l0  clment="+code=ha 2L lss="line" nam3="L6p3_lss=l"lineclass="sref">handle);3" class="l3ne" name="L632"> 632
3a hre3="fs/ocf).c#L6_dir_bh" clment="+coe10_to_cpu/a> = rodefl=cpu10/a>>10m1.c#L623" id=node" class="sr3me="L631"> lss="line" nam3="L6p3_lss=lloc_phan set the 28 *osb,
 28/path. < }

);
>10m1.c#L623" id=node"13" c12 523signa10 name="L613"> 213<3a216/3>,
>10m1.c#L623" id=node"1class="srame="L631"> lss="line" nam3="L6p31ss=/ =or_phan_dir_bh" clmentBUG_ON#L62le10_to_cpuBUG_ONd9 clsref">handlelass="Nuptodataa( helverificaLlass="Nuptodatafss="line" name="L6srrrrpes" =v0nseca10l0  ce=cpu10/a>>10m1.c#L623" id=node"1a 3h8 id=""L672/before 67 go a> *ocfs2_super *,
inod3 32="+230  2/inode.c#L630" id=LLLLLLLLL* 7"fs/#"1clailesystem running.  We knowecesserror isocfs2/inod27e<<<<<<<<2obably  rt nec3s class="l3wi1" i10232_signa10tus" c3ass="32k  id="L677" class="line" naLLLLLLLL* 7ocal  tatmmmmbfs/ocfs2/inode.c#L 2efe> 28 r  recs we!sre!= 
10ccfNOENT958 690              3" n10id=>13ccfs2_free_dinode( = rodefl=cpu10/a>>10m1.c#L623" icfs2/inodmeta_ecc3        eL" class="sref">3ULLmeta_eccfss="line" name="L6sa> =th8s

, <>10mde.c10_to_cpu/a> = >10m1.c#L623" id=node"ode=  dle<3a>);
;
handle);
lso 10_to_cpu/a> = lso fss="line" name="L6sML_ERROR10_to_cpu/a> = ML_ERRORhref=cl"L677" classcf8ing">"Cde.csum failss="or teflle %llu\n"0"> 690="fsuper bsb10m42_signa10103ode=INODE_CAC"L648" class3"lex"32andle=nodref="fs/ocfsoment_wipes" ="fs/oc9s2/iclasLcode=hdirtrrrrpes" =v0nseca10l0  /ocf8dx" clleletde" cl     nc#L62le10_to_cpucl     nc+code=cpu10/a>>10m1.c#L623" id=node"ever22a"sr3a>);
PTR_ERR(st58"> 958ocfs2_super *3a hr2);
 6tdd we'll3deadl3ck  id="L677" class="line" naLLLLLLLL* Errors after ss 28 r  recs we!e'll d3adlock stUp" ieefam">ok643" i9 39tuaid="L677" class="line" naLLLLLLLL*90"> 690              3="23 delet3d we'll deadlock2*sth3s 690*we&339;ll deadlock stOnly tak3efpe_330sec =or_phan_dir_bh" clmentoe10_to_cpu/a> = rodefl=cp92"> 6922/path. (23"comcname}
>10m1.c#L623" id=node"f" claef="3code=i_mutehandleitdeand_3>  handlespin7reS_VA/ID_Dmode=
>10m1.c#L623" ierror3        eL" class="serrorfss="line" name="L6sa> =th8s
"Inref"> teflle #%llu: pes"codef=cp%.*s\n"0"> 690="fsuper bsb10m42_signa10/* sec3es>10pes"codef10_to_cpu/a> = >10m1.c#L623" id=node"cascod9 cl3ss="s9ef">st58"> 958PTR_ERR(10 /ocfs2/inode.c 3ref=23code24oc_phan_dir_bh" clment="+code=="23 delet3="L631"> completio(uninod3d lon345ITE)a hephan_dir i9ctim10/a>>10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0seca10lock;
10 4ef="6" id="L673" cl23s="l24dle" cla"fs/ocfsu10/a>>10m1.c#L623" ierror3        eL" class="serrorfss="line" name="L6sa> =th8s
"Inref"> teflle #%llu: hef="+cmmm<%llu\n"0"> 690="fsuper bsb10m42_signa10sbh 9 ;3/* se_wipes" ="fs/oc9s2/iclasLcode=hdirtrrrrpes" =v0nseca10l0  /ocf8dx" clleletde" cl     nc#L62le10_to_cpucl     nc+cod,"fsuper bsb10m42_signa10/* se_wipes" ="fs/oc9s2/iclasLcode=hdirtm1.c#L6239ctim1 =or.s=rphan_wipes" =v0seca10lock;
>10m1.c#L623" id=node"cde" claef3wi1" i10232_signa10tus" c3ass="3ref">stat.c#L635" i10fref="+code=PTR_ERR2 class="sr2f">PTR_ERR(13ccfs2_free_dinode(>1031.c#L35="2632" cs=sref">ocfs2_super *3oc10mm2>103m#L676" id="L676" cla2s="3i25as35a hrer}"=a>href="!a10lock;
>10m1.c#L623" e" cla"srf="linocfs2/inode.c#L641" i9attra>        }
 631   235efss="linref="fs/ocfsu10/a>>10m1.c#L623" ierror3        eL" class="serrorfss="line" name="L6sa> =th8s
 lss="line" nam3="L6p35NOENTfsshandleocfsu"L677" classcf8ing">"Inref"> teflle #%llu: 9attr VA/ID_F/ not set\n"0"> 690="fsuper bsb10m42_signa10 Nclass=/a>        }
/* se_wipes" ="fs/oc9s2/iclasLcode=hdirtrrrrpes" =v0nseca10l0  /ocf8dx" clleletde" cl     nc#L62le10_to_cpucl     nc+code=cpu10/a>>10m1.c#L623" id=node"10/a> = >10m13c#L6235="l24dle" cla"fs/ocfsref="+code=PTR_ERR2 class="sr2f">PTR_ERR( attra>        3
 lss="line" nam3="L6p359 hrer}"=a>href="9ctim10/a>>10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0nseca10lock;
 =  = >10m13c#L6236ameLallocref="fs/ocfsu10/a>>10m1.c#L623" ierror3        eL" class="serrorfss="line" name="L6sa> =th8s
handleocfsu"L677" classcf8ing">"Inref"> teflle #%llu: fs_generationmmm<%u\n"0"> 690="fsuper bsb10m42_signa10/* se_wipes" ="fs/oc9s2/iclasLcode=hdirtrrrrpes" =v0nseca10l0  /ocf8dx" clleletde" cl     nc#L62le10_to_cpucl     nc+cod="fsuper bsb10m42_signa10handleocfsuctim10/a>>10m1.c#L6239ctim1 =or.s=rphan_wipes" =v0nseca10lock;
>10m13c#L6236ss=/ =or_phan"fs/ocfsref="+code=PTR_ERR2 class="sr2f">PTR_ERR(;
>10m1.c#L623" id=node"1 =or.s=rp3an_wipes" =v0seca10lock;
 = rodefl=cpu10/a>>10m1.c#L623" id=nodocfs23=or.s=rpha3_wipes" =v0nseca10lockocfs2_super *<1 =or.s=rp3an_wipes" =v0seca10lock;
PTR_ERR( = rodefl=cpu10/a>>10m1.c#L623" id=node"=ha 27fs/o310mm2name="L632"> 632 27_dir_bh" clment="+code=ha 2E"L3a handle=n3dro class="s9ef">sbh 9 ;
3a hre379igna)a hphan_dir_bh" clment="+cod3> 27/patha3);
>3          _fulss="sr2f">PTR_ER="fs/o0/a>>3          _fulsseca18de=OD}
;

;
href="+code=inodeNOENoc_3node"31lass="NOENocode>         returrrrrrrrpes" =v0nseca10l0  ="fsuper bsb10m42_signa10st58"> 958/* seeeee3de,
 =  663s3ate2h3e> 279" cl2ss="l24ass="DEADLKcor=hrd3a hr2732fr3lsc"2claef="fs/ocfs2/inod3.c#"237attr =or_phan_dir_bh" clment="+coe10_to_cpu/a> = rodefl=cpu10/a>>10m1.c#L623" id=node"ssaass 27s698 matess;
href="+code=inodeNOENoc_3node"31lass="NOENocode>        returrrrtmpNOENoc_3node"31tmpdefl=cp        returrrrrrrrpes" =v0nseca10l0  =cpu10/a>>10m1.c#L623" id=node"sor.s=rpha3bu > 2790"> 690<}
ocfs2_super *ok6438" id=nodephan_dir_bh" clmentoe10_to_cpu/a> = rodefl=cpu10/a>>10m1.c#L623" i0/a>>ow. < }
>ow. < seca10lock;
s>
 = /* set t1, < = 3ULL>10m1.c#L623" id=node"  28ass="name}
ocfs2_super *3tde" claef3"+code=i_mutex" clleletde3 cla"3refss="linref=_de,
>ow. < ()sref um<<2new bh, p
 690              3cf8dx" cl"3claef="+code=i_mutefllele3de" c38NOENTfsshandleoe10_to_cpu/a> = rodefl=de=cpu10/a>!        returrrrrrrrpes" =v0nseca10l0  clment="+code=ha 2L>10m1.c#LtmpNOENoc_3node"31tmpdefl=cpu10/a>>10m1.c#L623" id=node" a 27ass="3me="L631"> lss="line" nam3="L6p3_lss=lloc_phan_dir_bh" clment="+cod3=ha 2832fr3lsc"2it=early,malsul ing=3n ""23t=> 28ode,p9 622<#L665" id=/inodoe10_to_cpu/a> = rodefl=cpu10/a>>10m1.c#L623" id=node"node.c#L643" i9Nclass=/a>        }
<3 h9Nc38lss=lloc_phan_dir_bh" clment="+code=nocfs2/ino3e.c#L641" i9attra>       3}
ocfs2_super *<641" i9dyn3fe3" resetio(uninoded lo93yn_fe39ino303de,
>3          s="sr2f">PTR_ER="fs/o0/a>>3          seca18de=OD}
;

;
href="+code=inodeNOENoc_3node"31lass="NOENocode>         returrrrrrrrpes" =v0nseca10l0  clment="+code=ha 2L = <3 href="+code=cpu10/a>>10m3.c#L633" id=" cl2ss="l24ass="DEADLKcor=hrd3ocfs2/inod3.c#L641" i9siz10/a>>10m1.3#L6233siz1 =ore_phanp9 622<#L665" id=/inod="fs/o0/a>>3          _fulss="sr2f">PTR_ER="fs/o0/a>>3          _fulsseca1/a>;

>10m1.c#L623" id=node""sscounf/a3 = >10m13c#L6239mpu1 ef="ict       returrrru"linocfs2/inode.cu6NOENTf#L665" id=/inod="fs/o3     cache_owner3        eL" class="s3     cache_ownerseca18de=OD}
 =         }
        }
;
href="ass="s3     3 fsigna10/a> = >10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#L623" id=node""ocfs2/ino3s/ocfs2/inode.c#Lc2efe> 23a"sre39li30ass="s=sref">ocfs2_super *4unf/a> = <4 href="+code=cpu10/a>>10m4.c#L643" id=nodephanp9 622<#L665" id=/inod=ref="fs/ocfs2s58"il0  a9_wi;ll de.c#L641" i10512_signa10/a> = >10m1.4#L6234atim1 loc_phan_dir_bh" clment="+code4.c#L641" i4atim1_nseca10lock;
ocfs2_super *4cfs2/inode4c#L641" i9mtim10/a>>10m1.4#L6234mtim1 ef="ictass="s9ef">se=osb">10 " id0_sign bsb10m42_signa10;
;
handle);4cfs2/inode4c#L641" i9ctim10/a>>10m1.4#L6234ctim1 =orephanhe 3a>;
href="ass="s3     3 fsigna10/a> = >10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#L623" id=node4.c#L641" i4Ntim1_nseca10lock;
 28ode,p9 622<#L665" id=/inod=ref="fs/ocfs2s58"il0  a9_wi;ll de.c#L641" vfs=fresh2_sign c10>10m1i_a> =th8s
ode==cpu10/a>>10m1.c#L623" id=node4c8a 3h6e9<4+" i9b  98sa>        }
ocfs2_super *4a hr3h9 id4"L673"PTR_ER="fs/o3     cache_    seca18de=OD}
 =  lss="line" nam4="L6p412im1 =orephanhe 3a>;
href="ass="s3     3 fsigna10/a> = >10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#LEADLKcor=hrd4efs2/inode4ne" name="L632"> 632
4a hre419igna)a hphan_dir_bh" clment="+cod4 class="sr4me="L631"> lss="line" nam4="L6p41nsec =orephan_dir_bh" clment="+code=ocf2eass=""sre2aths maymalloc_ius -ERESe2ath> 2832=ref="fs/ocfs2s58"il0  a9_wi;ll de.c#L641" i10512_signa10/a> = 10ccfNOENT958);
 213<4a216/4>,
 =  lss="line" nam4="L6p41ss=/ " cl2ss="l24ass="DEADLKcor=hrd4ea 3h8 id=4"L672/before 67 go a> *;
href="ass="s3     3 fsigna10/a> = >10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#LEADLKcor=hrd4/icode=h"s4e d="sre1TE>10m1.c#LEADLKcor=hrd4/er bsb1024 deadlock here. Ins641" i4 92_u42tim1 =orephan_dir_bh" clment/ocfs2/inod35" id="L673" class="line<<<<<<< = inod4 42m> 27_dir_bh" clment="+code=ha 2E"L4s class="l4wi1" i10232_signa10tus" c4ass="429igna)a hphan_dir_bh" clment="+cod4sre!= 
10ccfNOENT958PTR_ER="fs/o3     cache_io_    seca18de=OD}
 = 14ccfs2_free_dinode();
;
>10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#LEADLKcor=hrd413" c122524signa10bail;
>10m1.c#L623" id=node4 c10104ode=INODE_CAC"L648" class4"lex"420sec =or_phan_dir_bh" clmentmutex_    s="sr2f">PTR_ERmutex_    <<<<<< = >10m1.c#LEADLKcor=hrd41a 3h8 id=4a>);
st58"> 958>10m1.c#LEADLKcor=hrd4ha 2e" cla4sre2ef="fs/ocfs2/inode.c#46322 4d="263ef="ict="L677" class="line" nammm3     cache_io_2/inod35" id="L673" c nammm3     cache_io_2/inodseca18de=OD}
 = handle);4>);
 6tdd we'll4deadl433pu1 =or_phanhe 3a>;
href="ass="s3     3 fsigna10/a> = >10m1.c#Lcache_3 fss" =fresh2_sign c10;
>10m1.c#Lhandle);4>re!= 
ok644" i9 43ode24oc_phan_dir_bh" clment="+code4="23 delet4d we'll deadlock2*sth4s = >10m1.c#LEADLKcor=hrd4"> 690*we&439;ll deadlock stOnly tak4efpe_430sec _dir_bh" clment="+code=ha 2E"L423" c122524ef">23"comcname}
>10m1.c#L623" id=node4f" claef="4code=i_mutehandleitdeand_4>  ;
href="ass="scachingsoperation }
handle);4>a 3h8 id=4"+code=i_mutex" clleletde4 cla"4refss="linref=+c=cpu10/a>>10m1co_owner3        eL" clco_ownerfss="linref========cpu10/a>>10m1.c#L623" id=nodocache_owner3        eL" class="s3     cache_ownerseca="fsuper bsb10m42_signa10>10m1co_cache_    s="sr2f">PTR_ERco_cache_    fss="linref===cpu10/a>>10m1.c#L623" id=nodocache_    s="sr2f">PTR_ER="fs/o3     cache_    seca="fsuper bsb10m42_signa10st58"> 958>10m1co_cache_2/inod35" id="L673" cco_cache_2/inod     =orphancpu10/a>>10m1.c#L623" id=nodocache_2/inod35" id="L673" c nammm3     cache_2/inodseca="fsuper bsb10m42_signa10>10m1co_io_    s="sr2f">PTR_ERco_io_    fss="linref======cpu10/a>>10m1.c#L623" id=nodocache_io_    s="sr2f">PTR_ER="fs/o3     cache_io_    seca="fsuper bsb10m42_signa1010 /ocfs2/inode.c 4ref=2444 id=nodephan+c=cpu10/a>>10m1co_io_2/inod35" id="L673" cco_io_2/inodsecainref======cpu10/a>>10m1.c#L623" id=nodocache_io_2/inod35" id="L673" c nammm3     cache_io_2/inodseca="fsuper bsb10m42_signa10 completio(uninod4d lon445ITE)}=cpu10/a>>10m1.c#LEADLKcor=hrd4=ha 2lclas4="sr2">10 4ef="6" id="L674" cl244nsec =orephan_dir_bh" clment="+cod4L623" id=n4dero class="s9ef">sbh 9 ;4


The original LXR softwaLXR r=hrunityseca=atmmmmexa hiref=al versionmby#orephan_dmailto:lxh@"s9ux.no">lxh@"s9ux.nol0 +
lxh."s9ux.no kindly hostedmby#orephan_dhttp://www.redpill-"s9pro.no">Redpill Ls9pro ASseca=aprovider of Ls9ux consulting and operation service since 1995.