• Jeff Layton's avatar
    ceph: shut down access to inode when async create fails · 5d6451b1
    Jeff Layton authored
    Add proper error handling for when an async create fails. The inode
    never existed, so any dirty caps or data are now toast. We already
    d_drop the dentry in that case, but the now-stale inode may still be
    around. We want to shut down access to these inodes, and ensure that
    they can't harbor any more dirty data, which can cause problems at
    umount time.
    
    When this occurs, flag such inodes as being SHUTDOWN, and trash any caps
    and cap flushes that may be in flight for them, and invalidate the
    pagecache for the inode. Add a new helper that can check whether an
    inode or an entire mount is now shut down, and call it instead of
    accessing the mount_state directly in places where we test that now.
    
    URL: https://tracker.ceph.com/issues/51279Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    5d6451b1
caps.c 126 KB