lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

004-device-include-goto-lable-as-well.patch (807B)


      1 From a887fe76be459d32a638d0abde96cc715632c8d5 Mon Sep 17 00:00:00 2001
      2 From: Daniel Golle <daniel@makrotopia.org>
      3 Date: Fri, 20 May 2016 06:31:15 +0200
      4 Subject: [PATCH] device: include goto lable as well
      5 To: lvm-devel@redhat.com
      6 
      7 commit b5314c2a6ae5fe4f802e82a4f31cf2fad398ded9
      8 device:  Retry open without O_NOATIME if it fails.
      9 
     10 makes use of goto lable 'opened:' but that might not be defined, e.g.
     11 on standard C libraries without O_DIRECT_SUPPORT.
     12 ---
     13  lib/device/dev-io.c | 2 +-
     14  1 file changed, 1 insertion(+), 1 deletion(-)
     15 
     16 --- a/lib/device/dev-io.c
     17 +++ b/lib/device/dev-io.c
     18 @@ -529,7 +529,7 @@ int dev_open_flags(struct device *dev, i
     19  		return 0;
     20  	}
     21  
     22 -#ifdef O_DIRECT_SUPPORT
     23 +#if defined(O_DIRECT_SUPPORT) || defined(O_NOATIME)
     24        opened:
     25  	if (direct)
     26  		dev->flags |= DEV_O_DIRECT_TESTED;