summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsotg.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2012-06-18 14:37:20 +0200
committerFelipe Balbi <balbi@ti.com>2012-06-22 13:19:37 +0300
commitd6e16a89578fcc8834be634c85c5c5ddc2d13229 (patch)
tree0013611c5f58bf8b466ec32a315d7aef292a72a3 /drivers/usb/gadget/s3c-hsotg.c
parentf87cabf4d56e1fc5d08434df9d54ef3450a756f0 (diff)
downloadop-kernel-dev-d6e16a89578fcc8834be634c85c5c5ddc2d13229.zip
op-kernel-dev-d6e16a89578fcc8834be634c85c5c5ddc2d13229.tar.gz
usb: gadget: mass_storage: fail fsg_store_file() early if colud not open file
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. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Alan Stern <stern@rowland.harvard.edu Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud