Re: [PATCH V2] btrfs: fix possible deadlock by clearing __GFP_FS flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Excerpts from Miao Xie's message of 2011-03-27 08:27:30 -0400:
> Changelog V1 -> V2:
> - modify the explanation of the deadlock.
> - clear __GFP_FS flag in the free space's page cache.
> 
> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
> index a039065..57df380 100644
> --- a/fs/btrfs/free-space-cache.c
> +++ b/fs/btrfs/free-space-cache.c
> @@ -88,6 +88,8 @@ struct inode *lookup_free_space_inode(struct btrfs_root *root,
>      }
>      spin_unlock(&block_group->lock);
>  
> +    inode->i_mapping->flags &= ~__GFP_FS;
> +
>      return inode;
>  }
>  

I did this part slightly differently, in btrfs_read_locked_inode.  That
way we know the mask isn't changing while page allocations are taking
place.

-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux