Re: [PATCH][RESEND] vfs: serialize updates to file->f_sb_err with f_lock

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

 



On Mon, Jan 04, 2021 at 01:43:47PM -0500, Jeff Layton wrote:
> @@ -172,7 +172,12 @@ SYSCALL_DEFINE1(syncfs, int, fd)
>  	ret = sync_filesystem(sb);
>  	up_read(&sb->s_umount);
>  
> -	ret2 = errseq_check_and_advance(&sb->s_wb_err, &f.file->f_sb_err);
> +	if (errseq_check(&sb->s_wb_err, f.file->f_sb_err)) {
> +		/* Something changed, must use slow path */
> +		spin_lock(&f.file->f_lock);
> +		ret2 = errseq_check_and_advance(&sb->s_wb_err, &f.file->f_sb_err);
> +		spin_unlock(&f.file->f_lock);
> +	}

	Is there any point bothering with the fastpath here?
I mean, look at the up_read() immediately prior to that thing...



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux