blkback.c (e2e4a0e02a29d0d88664c6dda74001991873f326) blkback.c (abd80ddb9474948fb291becc395d72b40927a32b)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2009-2012 Spectra Logic Corporation
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 2613 unchanged lines hidden (view full) ---

2622
2623 /*
2624 * Verify that we have the ability to upgrade to exclusive
2625 * access on this file so we can trap errors at open instead
2626 * of reporting them during first access.
2627 */
2628 if (VOP_ISLOCKED(xbb->vn) != LK_EXCLUSIVE) {
2629 vn_lock(xbb->vn, LK_UPGRADE | LK_RETRY);
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2009-2012 Spectra Logic Corporation
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 2613 unchanged lines hidden (view full) ---

2622
2623 /*
2624 * Verify that we have the ability to upgrade to exclusive
2625 * access on this file so we can trap errors at open instead
2626 * of reporting them during first access.
2627 */
2628 if (VOP_ISLOCKED(xbb->vn) != LK_EXCLUSIVE) {
2629 vn_lock(xbb->vn, LK_UPGRADE | LK_RETRY);
2630 if (xbb->vn->v_iflag & VI_DOOMED) {
2630 if (VN_IS_DOOMED(xbb->vn)) {
2631 error = EBADF;
2632 xenbus_dev_fatal(xbb->dev, error,
2633 "error locking file %s",
2634 xbb->dev_name);
2635
2636 return (error);
2637 }
2638 }

--- 1306 unchanged lines hidden ---
2631 error = EBADF;
2632 xenbus_dev_fatal(xbb->dev, error,
2633 "error locking file %s",
2634 xbb->dev_name);
2635
2636 return (error);
2637 }
2638 }

--- 1306 unchanged lines hidden ---