Skip to contentSkip to conversation

dql: Fix inconsistency between file mode and attr method.

PATCH Applied Hiroaki SHIMODA 3 participants 3 messages Jan 14, 2012 – Jan 17, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dql: Fix inconsistency between file mode and attr method.

There is no store() method for inflight attribute in the tx-<n>/byte_queue_limits sysfs directory.
So remove S_IWUSR bit.

---
 net/core/net-sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/net-sysfs.c +1 -1
index f3dbd4f..a1727cd 100644
@@ -929,7 +929,7 @@ static ssize_t bql_show_inflight(struct netdev_queue *queue,
 }
 
 static struct netdev_queue_attribute bql_inflight_attribute =
-	__ATTR(inflight, S_IRUGO | S_IWUSR, bql_show_inflight, NULL);
+	__ATTR(inflight, S_IRUGO, bql_show_inflight, NULL);
 
 #define BQL_ATTR(NAME, FIELD)						\
 static ssize_t bql_show_ ## NAME(struct netdev_queue *queue,		\
Signature · 1 line
1.7.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Hiroaki SHIMODA

There is no store() method for inflight attribute in the tx-<n>/byte_queue_limits sysfs directory.
So remove S_IWUSR bit.

---
 net/core/net-sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/net-sysfs.c +0 -0
index f3dbd4f..a1727cd 100644

net/core/net-sysfs.c static ssize_t bql_show_inflight(struct netdev_queue *queue, · line 935

Quoted 8 lines
net/core/net-sysfs.c +1 -1
@@ -929,7 +929,7 @@ static ssize_t bql_show_inflight(struct netdev_queue *queue,
 }
 
 static struct netdev_queue_attribute bql_inflight_attribute =
-	__ATTR(inflight, S_IRUGO | S_IWUSR, bql_show_inflight, NULL);
+	__ATTR(inflight, S_IRUGO, bql_show_inflight, NULL);
 
 #define BQL_ATTR(NAME, FIELD)						\
 static ssize_t bql_show_ ## NAME(struct netdev_queue *queue,		\