lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] usb: gadget: mass storage: fail fsg store file() early if colud not open file
On Mon, 18 Jun 2012, Michal Nazarewicz wrote:

> From: Michal Nazarewicz <mina86@mina86.com>
>
> Currently, when a new value is stored to the “file” sysfs entry,
> fsg_store_file() will release existing backing file and only then attempt to
> open a new one. If that fails, no new backing file is open.
>
> This commit changes the fsg_lun_open() so that it closes existing backing file
> only after the new backing file has been successfully opened. With that
> change, fsg_store_file() may use it to perform an atomic open operation with
> guarantee that logical unit will either point to the new backing file or still
> to the old one.

This is a good idea.

Acked-by: Alan Stern <stern@rowland.harvard.edu>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-06-18 17:02    [W:0.074 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site