Re: [PATCH 1/3] ceph: remove useless page->mapping check in writepage_nounlock()

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

 



On Tue, 2017-05-23 at 17:54 +0800, Yan, Zheng wrote:
> Callers of writepage_nounlock() have already ensured non-null
> page->mapping.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: "Yan, Zheng" <zyan@xxxxxxxxxx>
> ---
>  fs/ceph/addr.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index f49d6630..ff25239 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -534,10 +534,6 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
>  
>  	dout("writepage %p idx %lu\n", page, page->index);
>  
> -	if (!page->mapping || !page->mapping->host) {
> -		dout("writepage %p - no mapping\n", page);
> -		return -EFAULT;
> -	}
>  	inode = page->mapping->host;
>  	ci = ceph_inode(inode);
>  	fsc = ceph_inode_to_client(inode);

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux