mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 21:21:28 +00:00
- Fix 2 lockdep complains
- Preliminary update for 2.6.35 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -703,6 +703,10 @@ int iscsi_add_attr(struct iscsi_target *target,
|
||||
struct iscsi_attr *tgt_attr;
|
||||
struct list_head *attrs_list;
|
||||
const char *name;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
|
||||
defined(CONFIG_DEBUG_LOCK_ALLOC))
|
||||
static struct lock_class_key __key;
|
||||
#endif
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -749,6 +753,10 @@ int iscsi_add_attr(struct iscsi_target *target,
|
||||
|
||||
tgt_attr->attr.attr.name = tgt_attr->name;
|
||||
tgt_attr->attr.attr.owner = THIS_MODULE;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
|
||||
defined(CONFIG_DEBUG_LOCK_ALLOC))
|
||||
tgt_attr->attr.attr.key = &__key;
|
||||
#endif
|
||||
tgt_attr->attr.attr.mode = attr_info->mode & (S_IRUGO | S_IWUGO);
|
||||
tgt_attr->attr.show = iscsi_attr_show;
|
||||
tgt_attr->attr.store = iscsi_attr_store;
|
||||
|
||||
@@ -243,7 +243,9 @@ enum scst_cdb_flags {
|
||||
#define WRITE_ATTRIBUTE 0x8D
|
||||
#define WRITE_VERIFY_16 0x8E
|
||||
#define VERIFY_6 0x13
|
||||
#ifndef VERIFY_12
|
||||
#define VERIFY_12 0xAF
|
||||
#endif
|
||||
#ifndef GENERATING_UPSTREAM_PATCH
|
||||
/*
|
||||
* The constants below have been defined in the kernel header <scsi/scsi.h>
|
||||
|
||||
@@ -2739,7 +2739,11 @@ static int blockio_flush(struct block_device *bdev)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
res = blkdev_issue_flush(bdev, NULL);
|
||||
#else
|
||||
res = blkdev_issue_flush(bdev, GFP_KERNEL, NULL, BLKDEV_IFL_WAIT);
|
||||
#endif
|
||||
if (res != 0)
|
||||
PRINT_ERROR("blkdev_issue_flush() failed: %d", res);
|
||||
|
||||
|
||||
@@ -868,8 +868,10 @@ static int scst_pr_copy_file(const char *src, const char *dest)
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
res = scst_pr_vfs_fsync(file_dest, 0, file_size);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
res = vfs_fsync(file_dest, file_dest->f_path.dentry, 0);
|
||||
#else
|
||||
res = vfs_fsync(file_dest, 0);
|
||||
#endif
|
||||
if (res != 0) {
|
||||
PRINT_ERROR("fsync() of the backup PR file failed: %d", res);
|
||||
@@ -1035,8 +1037,10 @@ void scst_pr_sync_device_file(struct scst_tgt_dev *tgt_dev, struct scst_cmd *cmd
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
res = scst_pr_vfs_fsync(file, 0, pos);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
res = vfs_fsync(file, file->f_path.dentry, 0);
|
||||
#else
|
||||
res = vfs_fsync(file, 0);
|
||||
#endif
|
||||
if (res != 0) {
|
||||
PRINT_ERROR("fsync() of the PR file failed: %d", res);
|
||||
@@ -1051,8 +1055,10 @@ void scst_pr_sync_device_file(struct scst_tgt_dev *tgt_dev, struct scst_cmd *cmd
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
res = scst_pr_vfs_fsync(file, 0, sizeof(sign));
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
res = vfs_fsync(file, file->f_path.dentry, 0);
|
||||
#else
|
||||
res = vfs_fsync(file, 0);
|
||||
#endif
|
||||
if (res != 0) {
|
||||
PRINT_ERROR("fsync() of the PR file failed: %d", res);
|
||||
|
||||
@@ -2530,6 +2530,10 @@ int scst_create_acn_sysfs(struct scst_acg *acg, struct scst_acn *acn)
|
||||
int retval = 0;
|
||||
int len;
|
||||
struct kobj_attribute *attr = NULL;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
|
||||
defined(CONFIG_DEBUG_LOCK_ALLOC))
|
||||
static struct lock_class_key __key;
|
||||
#endif
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -2554,6 +2558,11 @@ int scst_create_acn_sysfs(struct scst_acg *acg, struct scst_acn *acn)
|
||||
strlcpy((char *)attr->attr.name, acn->name, len);
|
||||
|
||||
attr->attr.owner = THIS_MODULE;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && \
|
||||
defined(CONFIG_DEBUG_LOCK_ALLOC))
|
||||
attr->attr.key = &__key;
|
||||
#endif
|
||||
|
||||
attr->attr.mode = S_IRUGO;
|
||||
attr->show = scst_acn_file_show;
|
||||
attr->store = NULL;
|
||||
|
||||
Reference in New Issue
Block a user