diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-25 10:47:19 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-25 10:48:18 +0000 |
commit | e636463bd6ce65d581944d528ebf6b356bbda56c (patch) | |
tree | 71ca6305f5408025325bc8f8b707f73ba59e472d /main/iscsitarget-grsec/iscsitarget-2.6.38.patch | |
parent | c1df7d80b5083e37632b188f2338974679301b2f (diff) | |
download | aports-e636463bd6ce65d581944d528ebf6b356bbda56c.tar.bz2 aports-e636463bd6ce65d581944d528ebf6b356bbda56c.tar.xz |
main/iscsitarget-grsec: fix compile against 2.6.38
Diffstat (limited to 'main/iscsitarget-grsec/iscsitarget-2.6.38.patch')
-rw-r--r-- | main/iscsitarget-grsec/iscsitarget-2.6.38.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/iscsitarget-grsec/iscsitarget-2.6.38.patch b/main/iscsitarget-grsec/iscsitarget-2.6.38.patch new file mode 100644 index 000000000..90a5e5644 --- /dev/null +++ b/main/iscsitarget-grsec/iscsitarget-2.6.38.patch @@ -0,0 +1,32 @@ +--- ./kernel/block-io.c.orig ++++ ./kernel/block-io.c +@@ -155,14 +155,14 @@ + { + struct blockio_data *bio_data = volume->private; + struct block_device *bdev; +- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); ++ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); + int err = 0; + + bio_data->path = kstrdup(path, GFP_KERNEL); + if (!bio_data->path) + return -ENOMEM; + +- bdev = open_bdev_exclusive(path, flags, THIS_MODULE); ++ bdev = blkdev_get_by_path(path, flags, THIS_MODULE); + if (IS_ERR(bdev)) { + err = PTR_ERR(bdev); + eprintk("Can't open device %s, error %d\n", path, err); +@@ -250,10 +250,10 @@ + blockio_detach(struct iet_volume *volume) + { + struct blockio_data *bio_data = volume->private; +- int flags = FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); ++ int flags = FMODE_EXCL | FMODE_READ | (LUReadonly(volume) ? 0 : FMODE_WRITE); + + if (bio_data->bdev) +- close_bdev_exclusive(bio_data->bdev, flags); ++ blkdev_put(bio_data->bdev, flags); + kfree(bio_data->path); + + kfree(volume->private); |