Re: [PATCH 3/8] mm/swap: prevent concurrent swapon on the same S_ISBLK blockdev

2014-04-18 Thread Hugh Dickins
On Fri, 18 Apr 2014, Weijie Yang wrote: > On Tue, Feb 4, 2014 at 12:20 PM, Hugh Dickins wrote: > >> > >> Truly, I am fed up with silly swapon/swapoff races. How often does > >> anyone call these things? Let's slap a huge lock around the whole > >> thing and be done with it? > > > > That answer m

Re: [PATCH 3/8] mm/swap: prevent concurrent swapon on the same S_ISBLK blockdev

2014-04-17 Thread Weijie Yang
On Tue, Feb 4, 2014 at 12:20 PM, Hugh Dickins wrote: > On Mon, 3 Feb 2014, Andrew Morton wrote: >> On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang >> wrote: >> >> > When swapon the same S_ISBLK blockdev concurrent, the allocated two >> > swap_info could hold the same block_device, because claim_s

Re: [PATCH 3/8] mm/swap: prevent concurrent swapon on the same S_ISBLK blockdev

2014-02-03 Thread Hugh Dickins
On Mon, 3 Feb 2014, Andrew Morton wrote: > On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang > wrote: > > > When swapon the same S_ISBLK blockdev concurrent, the allocated two > > swap_info could hold the same block_device, because claim_swapfile() > > allow the same holder(here, it is sys_swapon f

Re: [PATCH 3/8] mm/swap: prevent concurrent swapon on the same S_ISBLK blockdev

2014-02-03 Thread Andrew Morton
On Mon, 27 Jan 2014 18:03:04 +0800 Weijie Yang wrote: > When swapon the same S_ISBLK blockdev concurrent, the allocated two > swap_info could hold the same block_device, because claim_swapfile() > allow the same holder(here, it is sys_swapon function). > > To prevent this situation, This patch a