···254254{255255 struct davinci_gpio_regs __iomem *g;256256 u32 mask = 0xffff;257257+ struct davinci_gpio_controller *d;257258258258- g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc);259259+ d = (struct davinci_gpio_controller *)irq_desc_get_handler_data(desc);260260+ g = (struct davinci_gpio_regs __iomem *)d->regs;259261260262 /* we only care about one bank */261263 if (irq & 1)···276274 if (!status)277275 break;278276 __raw_writel(status, &g->intstat);279279- if (irq & 1)280280- status >>= 16;281277282278 /* now demux them to the right lowlevel handler */283283- n = (int)irq_get_handler_data(irq);279279+ n = d->irq_base;280280+ if (irq & 1) {281281+ n += 16;282282+ status >>= 16;283283+ }284284+284285 while (status) {285286 res = ffs(status);286287 n += res;···429424430425 /* set up all irqs in this bank */431426 irq_set_chained_handler(bank_irq, gpio_irq_handler);432432- irq_set_handler_data(bank_irq, (__force void *)g);427427+428428+ /*429429+ * Each chip handles 32 gpios, and each irq bank consists of 16430430+ * gpio irqs. Pass the irq bank's corresponding controller to431431+ * the chained irq handler.432432+ */433433+ irq_set_handler_data(bank_irq, &chips[gpio / 32]);433434434435 for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {435436 irq_set_chip(irq, &gpio_irqchip);
···113113 return chan;114114}115115116116-int s3c2410_dma_config(unsigned int channel, int xferunit)116116+int s3c2410_dma_config(enum dma_ch channel, int xferunit)117117{118118 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);119119···297297 return 0;298298}299299300300-int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)300300+int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)301301{302302 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);303303···331331 *332332 */333333334334-int s3c2410_dma_enqueue(unsigned int channel, void *id,334334+int s3c2410_dma_enqueue(enum dma_ch channel, void *id,335335 dma_addr_t data, int size)336336{337337 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);···415415EXPORT_SYMBOL(s3c2410_dma_enqueue);416416417417418418-int s3c2410_dma_devconfig(unsigned int channel,418418+int s3c2410_dma_devconfig(enum dma_ch channel,419419 enum s3c2410_dmasrc source,420420 unsigned long devaddr)421421{···463463EXPORT_SYMBOL(s3c2410_dma_devconfig);464464465465466466-int s3c2410_dma_getposition(unsigned int channel,466466+int s3c2410_dma_getposition(enum dma_ch channel,467467 dma_addr_t *src, dma_addr_t *dst)468468{469469 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);···487487 * get control of an dma channel488488*/489489490490-int s3c2410_dma_request(unsigned int channel,490490+int s3c2410_dma_request(enum dma_ch channel,491491 struct s3c2410_dma_client *client,492492 void *dev)493493{···533533 * allowed to go through.534534*/535535536536-int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)536536+int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)537537{538538 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);539539 unsigned long flags;
+6-6
arch/arm/plat-s3c24xx/dma.c
···712712 * get control of an dma channel713713*/714714715715-int s3c2410_dma_request(unsigned int channel,715715+int s3c2410_dma_request(enum dma_ch channel,716716 struct s3c2410_dma_client *client,717717 void *dev)718718{···783783 * allowed to go through.784784*/785785786786-int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)786786+int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)787787{788788 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);789789 unsigned long flags;···974974}975975976976int977977-s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)977977+s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)978978{979979 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);980980···10211021 * xfersize: size of unit in bytes (1,2,4)10221022*/1023102310241024-int s3c2410_dma_config(unsigned int channel,10241024+int s3c2410_dma_config(enum dma_ch channel,10251025 int xferunit)10261026{10271027 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);···11001100 * devaddr: physical address of the source11011101*/1102110211031103-int s3c2410_dma_devconfig(unsigned int channel,11031103+int s3c2410_dma_devconfig(enum dma_ch channel,11041104 enum s3c2410_dmasrc source,11051105 unsigned long devaddr)11061106{···11731173 * returns the current transfer points for the dma source and destination11741174*/1175117511761176-int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst)11761176+int s3c2410_dma_getposition(enum dma_ch channel, dma_addr_t *src, dma_addr_t *dst)11771177{11781178 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);11791179
+3-3
arch/arm/plat-samsung/dma.c
···4141 * irq?4242*/43434444-int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn)4444+int s3c2410_dma_set_opfn(enum dma_ch channel, s3c2410_dma_opfn_t rtn)4545{4646 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);4747···5656}5757EXPORT_SYMBOL(s3c2410_dma_set_opfn);58585959-int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn)5959+int s3c2410_dma_set_buffdone_fn(enum dma_ch channel, s3c2410_dma_cbfn_t rtn)6060{6161 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);6262···7171}7272EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);73737474-int s3c2410_dma_setflags(unsigned int channel, unsigned int flags)7474+int s3c2410_dma_setflags(enum dma_ch channel, unsigned int flags)7575{7676 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);7777
+11-10
arch/arm/plat-samsung/include/plat/dma.h
···4242};43434444struct s3c2410_dma_chan;4545+enum dma_ch;45464647/* s3c2410_dma_cbfn_t4748 *···6362 * request a dma channel exclusivley6463*/65646666-extern int s3c2410_dma_request(unsigned int channel,6565+extern int s3c2410_dma_request(enum dma_ch channel,6766 struct s3c2410_dma_client *, void *dev);68676968···7271 * change the state of the dma channel7372*/74737575-extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op);7474+extern int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op);76757776/* s3c2410_dma_setflags7877 *7978 * set the channel's flags to a given state8079*/81808282-extern int s3c2410_dma_setflags(unsigned int channel,8181+extern int s3c2410_dma_setflags(enum dma_ch channel,8382 unsigned int flags);84838584/* s3c2410_dma_free···8786 * free the dma channel (will also abort any outstanding operations)8887*/89889090-extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *);8989+extern int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *);91909291/* s3c2410_dma_enqueue9392 *···9695 * drained before the buffer is given to the DMA system.9796*/98979999-extern int s3c2410_dma_enqueue(unsigned int channel, void *id,9898+extern int s3c2410_dma_enqueue(enum dma_ch channel, void *id,10099 dma_addr_t data, int size);101100102101/* s3c2410_dma_config···104103 * configure the dma channel105104*/106105107107-extern int s3c2410_dma_config(unsigned int channel, int xferunit);106106+extern int s3c2410_dma_config(enum dma_ch channel, int xferunit);108107109108/* s3c2410_dma_devconfig110109 *111110 * configure the device we're talking to112111*/113112114114-extern int s3c2410_dma_devconfig(unsigned int channel,113113+extern int s3c2410_dma_devconfig(enum dma_ch channel,115114 enum s3c2410_dmasrc source, unsigned long devaddr);116115117116/* s3c2410_dma_getposition···119118 * get the position that the dma transfer is currently at120119*/121120122122-extern int s3c2410_dma_getposition(unsigned int channel,121121+extern int s3c2410_dma_getposition(enum dma_ch channel,123122 dma_addr_t *src, dma_addr_t *dest);124123125125-extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);126126-extern int s3c2410_dma_set_buffdone_fn(unsigned int, s3c2410_dma_cbfn_t rtn);124124+extern int s3c2410_dma_set_opfn(enum dma_ch, s3c2410_dma_opfn_t rtn);125125+extern int s3c2410_dma_set_buffdone_fn(enum dma_ch, s3c2410_dma_cbfn_t rtn);127126128127
···226226 * Leon2 and Leon3 differ in their way of telling cache information227227 *228228 */229229-int leon_flush_needed(void)229229+int __init leon_flush_needed(void)230230{231231 int flush_needed = -1;232232 unsigned int ssize, sets;
+11-1
drivers/acpi/apei/hest.c
···139139{140140 struct platform_device *ghes_dev;141141 struct ghes_arr *ghes_arr = data;142142- int rc;142142+ int rc, i;143143144144 if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR)145145 return 0;146146147147 if (!((struct acpi_hest_generic *)hest_hdr)->enabled)148148 return 0;149149+ for (i = 0; i < ghes_arr->count; i++) {150150+ struct acpi_hest_header *hdr;151151+ ghes_dev = ghes_arr->ghes_devs[i];152152+ hdr = *(struct acpi_hest_header **)ghes_dev->dev.platform_data;153153+ if (hdr->source_id == hest_hdr->source_id) {154154+ pr_warning(FW_WARN HEST_PFX "Duplicated hardware error source ID: %d.\n",155155+ hdr->source_id);156156+ return -EIO;157157+ }158158+ }149159 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id);150160 if (!ghes_dev)151161 return -ENOMEM;
-17
drivers/acpi/osl.c
···13331333EXPORT_SYMBOL(acpi_resources_are_enforced);1334133413351335/*13361336- * Create and initialize a spinlock.13371337- */13381338-acpi_status13391339-acpi_os_create_lock(acpi_spinlock *out_handle)13401340-{13411341- spinlock_t *lock;13421342-13431343- lock = ACPI_ALLOCATE(sizeof(spinlock_t));13441344- if (!lock)13451345- return AE_NO_MEMORY;13461346- spin_lock_init(lock);13471347- *out_handle = lock;13481348-13491349- return AE_OK;13501350-}13511351-13521352-/*13531336 * Deallocate the memory for a spinlock.13541337 */13551338void acpi_os_delete_lock(acpi_spinlock handle)
···15381538};1539153915401540static const struct attribute_group it87_group_label = {15411541- .attrs = it87_attributes_vid,15411541+ .attrs = it87_attributes_label,15421542};1543154315441544/* SuperIO detection - will change isa_address if a chip is found */
+11
drivers/hwmon/max1111.c
···4040 struct spi_transfer xfer[2];4141 uint8_t *tx_buf;4242 uint8_t *rx_buf;4343+ struct mutex drvdata_lock;4444+ /* protect msg, xfer and buffers from multiple access */4345};44464547static int max1111_read(struct device *dev, int channel)···5048 uint8_t v1, v2;5149 int err;52505151+ /* writing to drvdata struct is not thread safe, wait on mutex */5252+ mutex_lock(&data->drvdata_lock);5353+5354 data->tx_buf[0] = (channel << MAX1111_CTRL_SEL_SH) |5455 MAX1111_CTRL_PD0 | MAX1111_CTRL_PD1 |5556 MAX1111_CTRL_SGL | MAX1111_CTRL_UNI | MAX1111_CTRL_STR;···6055 err = spi_sync(data->spi, &data->msg);6156 if (err < 0) {6257 dev_err(dev, "spi_sync failed with %d\n", err);5858+ mutex_unlock(&data->drvdata_lock);6359 return err;6460 }65616662 v1 = data->rx_buf[0];6763 v2 = data->rx_buf[1];6464+6565+ mutex_unlock(&data->drvdata_lock);68666967 if ((v1 & 0xc0) || (v2 & 0x3f))7068 return -EINVAL;···184176 if (err)185177 goto err_free_data;186178179179+ mutex_init(&data->drvdata_lock);180180+187181 data->spi = spi;188182 spi_set_drvdata(spi, data);189183···223213224214 hwmon_device_unregister(data->hwmon_dev);225215 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);216216+ mutex_destroy(&data->drvdata_lock);226217 kfree(data->rx_buf);227218 kfree(data->tx_buf);228219 kfree(data);
+10-10
drivers/hwmon/pmbus_core.c
···362362 * Convert linear sensor values to milli- or micro-units363363 * depending on sensor type.364364 */365365-static int pmbus_reg2data_linear(struct pmbus_data *data,366366- struct pmbus_sensor *sensor)365365+static long pmbus_reg2data_linear(struct pmbus_data *data,366366+ struct pmbus_sensor *sensor)367367{368368 s16 exponent;369369 s32 mantissa;···397397 else398398 val >>= -exponent;399399400400- return (int)val;400400+ return val;401401}402402403403/*404404 * Convert direct sensor values to milli- or micro-units405405 * depending on sensor type.406406 */407407-static int pmbus_reg2data_direct(struct pmbus_data *data,408408- struct pmbus_sensor *sensor)407407+static long pmbus_reg2data_direct(struct pmbus_data *data,408408+ struct pmbus_sensor *sensor)409409{410410 long val = (s16) sensor->data;411411 long m, b, R;···440440 R++;441441 }442442443443- return (int)((val - b) / m);443443+ return (val - b) / m;444444}445445446446-static int pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor)446446+static long pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor)447447{448448- int val;448448+ long val;449449450450 if (data->info->direct[sensor->class])451451 val = pmbus_reg2data_direct(data, sensor);···619619 if (!s1 && !s2)620620 *val = !!regval;621621 else {622622- int v1, v2;622622+ long v1, v2;623623 struct pmbus_sensor *sensor1, *sensor2;624624625625 sensor1 = &data->sensors[s1];···661661 if (sensor->data < 0)662662 return sensor->data;663663664664- return snprintf(buf, PAGE_SIZE, "%d\n", pmbus_reg2data(data, sensor));664664+ return snprintf(buf, PAGE_SIZE, "%ld\n", pmbus_reg2data(data, sensor));665665}666666667667static ssize_t pmbus_set_sensor(struct device *dev,
+8
drivers/media/dvb/dvb-core/dvb_frontend.c
···19881988 if (dvbdev->users == -1 && fe->ops.ts_bus_ctrl) {19891989 if ((ret = fe->ops.ts_bus_ctrl(fe, 1)) < 0)19901990 goto err0;19911991+19921992+ /* If we took control of the bus, we need to force19931993+ reinitialization. This is because many ts_bus_ctrl()19941994+ functions strobe the RESET pin on the demod, and if the19951995+ frontend thread already exists then the dvb_init() routine19961996+ won't get called (which is what usually does initial19971997+ register configuration). */19981998+ fepriv->reinitialise = 1;19911999 }1992200019932001 if ((ret = dvb_generic_open (inode, file)) < 0)
+2-2
drivers/media/radio/Kconfig
···168168169169config RADIO_MIROPCM20170170 tristate "miroSOUND PCM20 radio"171171- depends on ISA && VIDEO_V4L2 && SND171171+ depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND172172 select SND_ISA173173 select SND_MIRO174174 ---help---···201201202202config RADIO_SF16FMR2203203 tristate "SF16FMR2 Radio"204204- depends on ISA && VIDEO_V4L2204204+ depends on ISA && VIDEO_V4L2 && SND205205 ---help---206206 Choose Y here if you have one of these FM radio cards.207207
+2-2
drivers/media/radio/si4713-i2c.c
···10331033 char ps_name[MAX_RDS_PS_NAME + 1];1034103410351035 len = control->size - 1;10361036- if (len > MAX_RDS_PS_NAME) {10361036+ if (len < 0 || len > MAX_RDS_PS_NAME) {10371037 rval = -ERANGE;10381038 goto exit;10391039 }···10571057 char radio_text[MAX_RDS_RADIO_TEXT + 1];1058105810591059 len = control->size - 1;10601060- if (len > MAX_RDS_RADIO_TEXT) {10601060+ if (len < 0 || len > MAX_RDS_RADIO_TEXT) {10611061 rval = -ERANGE;10621062 goto exit;10631063 }
+5-4
drivers/media/rc/mceusb.c
···558558 inout, data1);559559 break;560560 case MCE_CMD_S_TIMEOUT:561561- /* value is in units of 50us, so x*50/100 or x/2 ms */561561+ /* value is in units of 50us, so x*50/1000 ms */562562 dev_info(dev, "%s receive timeout of %d ms\n",563563- inout, ((data1 << 8) | data2) / 2);563563+ inout,564564+ ((data1 << 8) | data2) * MCE_TIME_UNIT / 1000);564565 break;565566 case MCE_CMD_G_TIMEOUT:566567 dev_info(dev, "Get receive timeout\n");···848847 switch (ir->buf_in[index]) {849848 /* 2-byte return value commands */850849 case MCE_CMD_S_TIMEOUT:851851- ir->rc->timeout = US_TO_NS((hi << 8 | lo) / 2);850850+ ir->rc->timeout = US_TO_NS((hi << 8 | lo) * MCE_TIME_UNIT);852851 break;853852854853 /* 1-byte return value commands */···10791078 rc->priv = ir;10801079 rc->driver_type = RC_DRIVER_IR_RAW;10811080 rc->allowed_protos = RC_TYPE_ALL;10821082- rc->timeout = US_TO_NS(1000);10811081+ rc->timeout = MS_TO_NS(100);10831082 if (!ir->flags.no_tx) {10841083 rc->s_tx_mask = mceusb_set_tx_mask;10851084 rc->s_tx_carrier = mceusb_set_tx_carrier;
+1-1
drivers/media/rc/nuvoton-cir.c
···11101110 rdev->dev.parent = &pdev->dev;11111111 rdev->driver_name = NVT_DRIVER_NAME;11121112 rdev->map_name = RC_MAP_RC6_MCE;11131113- rdev->timeout = US_TO_NS(1000);11131113+ rdev->timeout = MS_TO_NS(100);11141114 /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */11151115 rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD);11161116#if 0
···714714 * returns 0.715715 * This function is needed for boards that have a separate tuner for716716 * radio (like devices with tea5767).717717+ * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to718718+ * select a TV frequency. So, t_mode = T_ANALOG_TV could actually719719+ * be used to represent a Digital TV too.717720 */718721static inline int check_mode(struct tuner *t, enum v4l2_tuner_type mode)719722{720720- if ((1 << mode & t->mode_mask) == 0)723723+ int t_mode;724724+ if (mode == V4L2_TUNER_RADIO)725725+ t_mode = T_RADIO;726726+ else727727+ t_mode = T_ANALOG_TV;728728+729729+ if ((t_mode & t->mode_mask) == 0)721730 return -EINVAL;722731723732 return 0;···993984 case V4L2_TUNER_RADIO:994985 p = "radio";995986 break;996996- case V4L2_TUNER_DIGITAL_TV:987987+ case V4L2_TUNER_DIGITAL_TV: /* Used by mt20xx */997988 p = "digital TV";998989 break;999990 case V4L2_TUNER_ANALOG_TV:···11441135 return 0;11451136 if (vt->type == t->mode && analog_ops->get_afc)11461137 vt->afc = analog_ops->get_afc(&t->fe);11471147- if (vt->type == V4L2_TUNER_ANALOG_TV)11381138+ if (t->mode != V4L2_TUNER_RADIO) {11481139 vt->capability |= V4L2_TUNER_CAP_NORM;11491149- if (vt->type != V4L2_TUNER_RADIO) {11501140 vt->rangelow = tv_range[0] * 16;11511141 vt->rangehigh = tv_range[1] * 16;11521142 return 0;
···348348349349 /* Only look at sockets that are using this specific device. */350350 switch (event) {351351+ case NETDEV_CHANGEADDR:351352 case NETDEV_CHANGEMTU:352352- /* A change in mtu is a bad thing, requiring353353+ /* A change in mtu or address is a bad thing, requiring353354 * LCP re-negotiation.354355 */355356
+5-3
drivers/net/r6040.c
···677677 if (status & RX_FIFO_FULL)678678 dev->stats.rx_fifo_errors++;679679680680- /* Mask off RX interrupt */681681- misr &= ~RX_INTS;682682- napi_schedule(&lp->napi);680680+ if (likely(napi_schedule_prep(&lp->napi))) {681681+ /* Mask off RX interrupt */682682+ misr &= ~RX_INTS;683683+ __napi_schedule(&lp->napi);684684+ }683685 }684686685687 /* TX interrupt request */
-4
drivers/net/tulip/dmfe.c
···879879 txptr = db->tx_remove_ptr;880880 while(db->tx_packet_cnt) {881881 tdes0 = le32_to_cpu(txptr->tdes0);882882- pr_debug("tdes0=%x\n", tdes0);883882 if (tdes0 & 0x80000000)884883 break;885884···888889889890 /* Transmit statistic counter */890891 if ( tdes0 != 0x7fffffff ) {891891- pr_debug("tdes0=%x\n", tdes0);892892 dev->stats.collisions += (tdes0 >> 3) & 0xf;893893 dev->stats.tx_bytes += le32_to_cpu(txptr->tdes1) & 0x7ff;894894 if (tdes0 & TDES0_ERR_MASK) {···984986 /* error summary bit check */985987 if (rdes0 & 0x8000) {986988 /* This is a error packet */987987- pr_debug("rdes0: %x\n", rdes0);988989 dev->stats.rx_errors++;989990 if (rdes0 & 1)990991 dev->stats.rx_fifo_errors++;···16351638 else /* DM9102/DM9102A */16361639 phy_mode = phy_read(db->ioaddr,16371640 db->phy_addr, 17, db->chip_id) & 0xf000;16381638- pr_debug("Phy_mode %x\n", phy_mode);16391641 switch (phy_mode) {16401642 case 0x1000: db->op_mode = DMFE_10MHF; break;16411643 case 0x2000: db->op_mode = DMFE_10MFD; break;
+1-2
drivers/watchdog/Kconfig
···599599600600config HP_WATCHDOG601601 tristate "HP ProLiant iLO2+ Hardware Watchdog Timer"602602- depends on X86603603- default m602602+ depends on X86 && PCI604603 help605604 A software monitoring watchdog and NMI sourcing driver. This driver606605 will detect lockups and provide a stack trace. This is a driver that
+16-3
fs/ceph/mds_client.c
···14381438 struct dentry *temp;14391439 char *path;14401440 int len, pos;14411441+ unsigned seq;1441144214421443 if (dentry == NULL)14431444 return ERR_PTR(-EINVAL);1444144514451446retry:14461447 len = 0;14481448+ seq = read_seqbegin(&rename_lock);14491449+ rcu_read_lock();14471450 for (temp = dentry; !IS_ROOT(temp);) {14481451 struct inode *inode = temp->d_inode;14491452 if (inode && ceph_snap(inode) == CEPH_SNAPDIR)···14581455 len += 1 + temp->d_name.len;14591456 temp = temp->d_parent;14601457 if (temp == NULL) {14581458+ rcu_read_unlock();14611459 pr_err("build_path corrupt dentry %p\n", dentry);14621460 return ERR_PTR(-EINVAL);14631461 }14641462 }14631463+ rcu_read_unlock();14651464 if (len)14661465 len--; /* no leading '/' */14671466···14721467 return ERR_PTR(-ENOMEM);14731468 pos = len;14741469 path[pos] = 0; /* trailing null */14701470+ rcu_read_lock();14751471 for (temp = dentry; !IS_ROOT(temp) && pos != 0; ) {14761476- struct inode *inode = temp->d_inode;14721472+ struct inode *inode;1477147314741474+ spin_lock(&temp->d_lock);14751475+ inode = temp->d_inode;14781476 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) {14791477 dout("build_path path+%d: %p SNAPDIR\n",14801478 pos, temp);···14861478 break;14871479 } else {14881480 pos -= temp->d_name.len;14891489- if (pos < 0)14811481+ if (pos < 0) {14821482+ spin_unlock(&temp->d_lock);14901483 break;14841484+ }14911485 strncpy(path + pos, temp->d_name.name,14921486 temp->d_name.len);14931487 }14881488+ spin_unlock(&temp->d_lock);14941489 if (pos)14951490 path[--pos] = '/';14961491 temp = temp->d_parent;14971492 if (temp == NULL) {14931493+ rcu_read_unlock();14981494 pr_err("build_path corrupt dentry\n");14991495 kfree(path);15001496 return ERR_PTR(-EINVAL);15011497 }15021498 }15031503- if (pos != 0) {14991499+ rcu_read_unlock();15001500+ if (pos != 0 || read_seqretry(&rename_lock, seq)) {15041501 pr_err("build_path did not end path lookup where "15051502 "expected, namelen is %d, pos is %d\n", len, pos);15061503 /* presumably this is only possible if racing with a
···3737/* These macros may change in future, to provide better st_ino semantics. */3838#define OFFSET(x) ((x)->i_ino)39394040-static unsigned long cramino(struct cramfs_inode *cino, unsigned int offset)4040+static unsigned long cramino(const struct cramfs_inode *cino, unsigned int offset)4141{4242 if (!cino->offset)4343 return offset + 1;···6161}62626363static struct inode *get_cramfs_inode(struct super_block *sb,6464- struct cramfs_inode *cramfs_inode, unsigned int offset)6464+ const struct cramfs_inode *cramfs_inode, unsigned int offset)6565{6666 struct inode *inode;6767 static struct timespec zerotime;···317317 /* Set it all up.. */318318 sb->s_op = &cramfs_ops;319319 root = get_cramfs_inode(sb, &super.root, 0);320320- if (!root)320320+ if (IS_ERR(root))321321 goto out;322322 sb->s_root = d_alloc_root(root);323323 if (!sb->s_root) {···423423static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)424424{425425 unsigned int offset = 0;426426+ struct inode *inode = NULL;426427 int sorted;427428428429 mutex_lock(&read_mutex);···450449451450 for (;;) {452451 if (!namelen) {453453- mutex_unlock(&read_mutex);454454- return ERR_PTR(-EIO);452452+ inode = ERR_PTR(-EIO);453453+ goto out;455454 }456455 if (name[namelen-1])457456 break;···463462 if (retval > 0)464463 continue;465464 if (!retval) {466466- struct cramfs_inode entry = *de;467467- mutex_unlock(&read_mutex);468468- d_add(dentry, get_cramfs_inode(dir->i_sb, &entry, dir_off));469469- return NULL;465465+ inode = get_cramfs_inode(dir->i_sb, de, dir_off);466466+ break;470467 }471468 /* else (retval < 0) */472469 if (sorted)473470 break;474471 }472472+out:475473 mutex_unlock(&read_mutex);476476- d_add(dentry, NULL);474474+ if (IS_ERR(inode))475475+ return ERR_CAST(inode);476476+ d_add(dentry, inode);477477 return NULL;478478}479479
+34-17
fs/dcache.c
···22132213 * The hash value has to match the hash queue that the dentry is on..22142214 */22152215/*22162216- * d_move - move a dentry22162216+ * __d_move - move a dentry22172217 * @dentry: entry to move22182218 * @target: new dentry22192219 *22202220 * Update the dcache to reflect the move of a file name. Negative22212221- * dcache entries should not be moved in this way.22212221+ * dcache entries should not be moved in this way. Caller hold22222222+ * rename_lock.22222223 */22232223-void d_move(struct dentry * dentry, struct dentry * target)22242224+static void __d_move(struct dentry * dentry, struct dentry * target)22242225{22252226 if (!dentry->d_inode)22262227 printk(KERN_WARNING "VFS: moving negative dcache entry\n");2227222822282229 BUG_ON(d_ancestor(dentry, target));22292230 BUG_ON(d_ancestor(target, dentry));22302230-22312231- write_seqlock(&rename_lock);2232223122332232 dentry_lock_for_move(dentry, target);22342233···22742275 spin_unlock(&target->d_lock);22752276 fsnotify_d_move(dentry);22762277 spin_unlock(&dentry->d_lock);22782278+}22792279+22802280+/*22812281+ * d_move - move a dentry22822282+ * @dentry: entry to move22832283+ * @target: new dentry22842284+ *22852285+ * Update the dcache to reflect the move of a file name. Negative22862286+ * dcache entries should not be moved in this way.22872287+ */22882288+void d_move(struct dentry *dentry, struct dentry *target)22892289+{22902290+ write_seqlock(&rename_lock);22912291+ __d_move(dentry, target);22772292 write_sequnlock(&rename_lock);22782293}22792294EXPORT_SYMBOL(d_move);···23152302 * This helper attempts to cope with remotely renamed directories23162303 *23172304 * It assumes that the caller is already holding23182318- * dentry->d_parent->d_inode->i_mutex and the inode->i_lock23052305+ * dentry->d_parent->d_inode->i_mutex, inode->i_lock and rename_lock23192306 *23202307 * Note: If ever the locking in lock_rename() changes, then please23212308 * remember to update this too...···23302317 if (alias->d_parent == dentry->d_parent)23312318 goto out_unalias;2332231923332333- /* Check for loops */23342334- ret = ERR_PTR(-ELOOP);23352335- if (d_ancestor(alias, dentry))23362336- goto out_err;23372337-23382320 /* See lock_rename() */23392321 ret = ERR_PTR(-EBUSY);23402322 if (!mutex_trylock(&dentry->d_sb->s_vfs_rename_mutex))···23392331 goto out_err;23402332 m2 = &alias->d_parent->d_inode->i_mutex;23412333out_unalias:23422342- d_move(alias, dentry);23342334+ __d_move(alias, dentry);23432335 ret = alias;23442336out_err:23452337 spin_unlock(&inode->i_lock);···24242416 alias = __d_find_alias(inode, 0);24252417 if (alias) {24262418 actual = alias;24272427- /* Is this an anonymous mountpoint that we could splice24282428- * into our tree? */24292429- if (IS_ROOT(alias)) {24192419+ write_seqlock(&rename_lock);24202420+24212421+ if (d_ancestor(alias, dentry)) {24222422+ /* Check for loops */24232423+ actual = ERR_PTR(-ELOOP);24242424+ } else if (IS_ROOT(alias)) {24252425+ /* Is this an anonymous mountpoint that we24262426+ * could splice into our tree? */24302427 __d_materialise_dentry(dentry, alias);24282428+ write_sequnlock(&rename_lock);24312429 __d_drop(alias);24322430 goto found;24312431+ } else {24322432+ /* Nope, but we must(!) avoid directory24332433+ * aliasing */24342434+ actual = __d_unalias(inode, dentry, alias);24332435 }24342434- /* Nope, but we must(!) avoid directory aliasing */24352435- actual = __d_unalias(inode, dentry, alias);24362436+ write_sequnlock(&rename_lock);24362437 if (IS_ERR(actual))24372438 dput(alias);24382439 goto out_nolock;
+1-1
fs/exofs/super.c
···913913 unsigned long ino = exofs_parent_ino(child);914914915915 if (!ino)916916- return NULL;916916+ return ERR_PTR(-ESTALE);917917918918 return d_obtain_alias(exofs_iget(child->d_inode->i_sb, ino));919919}
···903903 if (gfs2_ail1_empty(sdp))904904 break;905905 }906906+ gfs2_log_flush(sdp, NULL);906907}907908908909static inline int gfs2_jrnl_flush_reqd(struct gfs2_sbd *sdp)
+3
fs/gfs2/ops_fstype.c
···72727373 init_waitqueue_head(&sdp->sd_glock_wait);7474 atomic_set(&sdp->sd_glock_disposal, 0);7575+ init_completion(&sdp->sd_locking_init);7576 spin_lock_init(&sdp->sd_statfs_spin);76777778 spin_lock_init(&sdp->sd_rindex_spin);···10181017 fsname++;10191018 if (lm->lm_mount == NULL) {10201019 fs_info(sdp, "Now mounting FS...\n");10201020+ complete(&sdp->sd_locking_init);10211021 return 0;10221022 }10231023 ret = lm->lm_mount(sdp, fsname);10241024 if (ret == 0)10251025 fs_info(sdp, "Joined cluster. Now mounting FS...\n");10261026+ complete(&sdp->sd_locking_init);10261027 return ret;10271028}10281029
+30-6
fs/gfs2/super.c
···757757 struct timespec atime;758758 struct gfs2_dinode *di;759759 int ret = -EAGAIN;760760+ int unlock_required = 0;760761761762 /* Skip timestamp update, if this is from a memalloc */762763 if (current->flags & PF_MEMALLOC)763764 goto do_flush;764764- ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);765765- if (ret)766766- goto do_flush;765765+ if (!gfs2_glock_is_locked_by_me(ip->i_gl)) {766766+ ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);767767+ if (ret)768768+ goto do_flush;769769+ unlock_required = 1;770770+ }767771 ret = gfs2_trans_begin(sdp, RES_DINODE, 0);768772 if (ret)769773 goto do_unlock;···784780 }785781 gfs2_trans_end(sdp);786782do_unlock:787787- gfs2_glock_dq_uninit(&gh);783783+ if (unlock_required)784784+ gfs2_glock_dq_uninit(&gh);788785do_flush:789786 if (wbc->sync_mode == WB_SYNC_ALL)790787 gfs2_log_flush(GFS2_SB(inode), ip->i_gl);···14321427 return error;14331428}1434142914351435-/*14301430+/**14311431+ * gfs2_evict_inode - Remove an inode from cache14321432+ * @inode: The inode to evict14331433+ *14341434+ * There are three cases to consider:14351435+ * 1. i_nlink == 0, we are final opener (and must deallocate)14361436+ * 2. i_nlink == 0, we are not the final opener (and cannot deallocate)14371437+ * 3. i_nlink > 014381438+ *14391439+ * If the fs is read only, then we have to treat all cases as per #314401440+ * since we are unable to do any deallocation. The inode will be14411441+ * deallocated by the next read/write node to attempt an allocation14421442+ * in the same resource group14431443+ *14361444 * We have to (at the moment) hold the inodes main lock to cover14371445 * the gap between unlocking the shared lock on the iopen lock and14381446 * taking the exclusive lock. I'd rather do a shared -> exclusive···14881470 if (error)14891471 goto out_truncate;1490147214731473+ /* Case 1 starts here */14741474+14911475 if (S_ISDIR(inode->i_mode) &&14921476 (ip->i_diskflags & GFS2_DIF_EXHASH)) {14931477 error = gfs2_dir_exhash_dealloc(ip);···15131493 goto out_unlock;1514149415151495out_truncate:14961496+ /* Case 2 starts here */15161497 error = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks);15171498 if (error)15181499 goto out_unlock;15191519- gfs2_final_release_pages(ip);15001500+ /* Needs to be done before glock release & also in a transaction */15011501+ truncate_inode_pages(&inode->i_data, 0);15201502 gfs2_trans_end(sdp);1521150315221504out_unlock:15051505+ /* Error path for case 1 */15231506 if (test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags))15241507 gfs2_glock_dq(&ip->i_iopen_gh);15251508 gfs2_holder_uninit(&ip->i_iopen_gh);···15301507 if (error && error != GLR_TRYFAILED && error != -EROFS)15311508 fs_warn(sdp, "gfs2_evict_inode: %d\n", error);15321509out:15101510+ /* Case 3 starts here */15331511 truncate_inode_pages(&inode->i_data, 0);15341512 end_writeback(inode);15351513
+6-1
fs/gfs2/sys.c
···338338 rv = sscanf(buf, "%u", &first);339339 if (rv != 1 || first > 1)340340 return -EINVAL;341341+ rv = wait_for_completion_killable(&sdp->sd_locking_init);342342+ if (rv)343343+ return rv;341344 spin_lock(&sdp->sd_jindex_spin);342345 rv = -EBUSY;343346 if (test_bit(SDF_NOJOURNALID, &sdp->sd_flags) == 0)···417414 rv = sscanf(buf, "%d", &jid);418415 if (rv != 1)419416 return -EINVAL;420420-417417+ rv = wait_for_completion_killable(&sdp->sd_locking_init);418418+ if (rv)419419+ return rv;421420 spin_lock(&sdp->sd_jindex_spin);422421 rv = -EINVAL;423422 if (sdp->sd_lockstruct.ls_ops->lm_mount == NULL)
···822822 goto out;823823824824 attr->set_buf[size] = '\0';825825- val = simple_strtol(attr->set_buf, NULL, 0);825825+ val = simple_strtoll(attr->set_buf, NULL, 0);826826 ret = attr->set(attr->data, val);827827 if (ret == 0)828828 ret = len; /* on success, claim we got the whole input */
+8-1
fs/namei.c
···433433 goto err_parent;434434 BUG_ON(nd->inode != parent->d_inode);435435 } else {436436+ if (dentry->d_parent != parent)437437+ goto err_parent;436438 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);437439 if (!__d_rcu_to_refcount(dentry, nd->seq))438440 goto err_child;···942940 * Don't forget we might have a non-mountpoint managed dentry943941 * that wants to block transit.944942 */945945- *inode = path->dentry->d_inode;946943 if (unlikely(managed_dentry_might_block(path->dentry)))947944 return false;948945···954953 path->mnt = mounted;955954 path->dentry = mounted->mnt_root;956955 nd->seq = read_seqcount_begin(&path->dentry->d_seq);956956+ /*957957+ * Update the inode too. We don't need to re-check the958958+ * dentry sequence number here after this d_inode read,959959+ * because a mount-point is always pinned.960960+ */961961+ *inode = path->dentry->d_inode;957962 }958963 return true;959964}
+4-8
fs/ufs/namei.c
···56565757 lock_ufs(dir->i_sb);5858 ino = ufs_inode_by_name(dir, &dentry->d_name);5959- if (ino) {5959+ if (ino)6060 inode = ufs_iget(dir->i_sb, ino);6161- if (IS_ERR(inode)) {6262- unlock_ufs(dir->i_sb);6363- return ERR_CAST(inode);6464- }6565- }6661 unlock_ufs(dir->i_sb);6767- d_add(dentry, inode);6868- return NULL;6262+ if (IS_ERR(inode))6363+ return ERR_CAST(inode);6464+ return d_splice_alias(inode, dentry);6965}70667167/*
+1-1
include/acpi/acpi_bus.h
···210210struct acpi_device_power {211211 int state; /* Current state */212212 struct acpi_device_power_flags flags;213213- struct acpi_device_power_state states[4]; /* Power states (D0-D3) */213213+ struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */214214};215215216216/* Performance Management */
···159159 } while (0)160160#endif161161162162+/*163163+ * When lockdep is enabled, the spin_lock_init() macro stringifies it's164164+ * argument and uses that as a name for the lock in debugging.165165+ * By executing spin_lock_init() in a macro the key changes from "lock" for166166+ * all locks to the name of the argument of acpi_os_create_lock(), which167167+ * prevents lockdep from reporting false positives for ACPICA locks.168168+ */169169+#define acpi_os_create_lock(__handle) \170170+({ \171171+ spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \172172+ \173173+ if (lock) { \174174+ *(__handle) = lock; \175175+ spin_lock_init(*(__handle)); \176176+ } \177177+ lock ? AE_OK : AE_NO_MEMORY; \178178+})179179+162180#endif /* __KERNEL__ */163181164182#endif /* __ACLINUX_H__ */
···10701070#define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \10711071 NETIF_F_FSO)1072107210731073-#define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \10741074- NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \10751075- NETIF_F_HIGHDMA | \10761076- NETIF_F_SCTP_CSUM | \10771077- NETIF_F_ALL_FCOE)10781078-10791073 /*10801074 * If one device supports one of these features, then enable them10811075 * for all in netdev_increment_features.
+1-5
include/linux/sdla.h
···112112 short Tb_max;113113};114114115115-#ifndef __KERNEL__116116-117117-void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet);118118-119119-#else115115+#ifdef __KERNEL__120116121117/* important Z80 window addresses */122118#define SDLA_CONTROL_WND 0xE000
+25-1
kernel/rcutree.c
···84848585static struct rcu_state *rcu_state;86868787+/*8888+ * The rcu_scheduler_active variable transitions from zero to one just8989+ * before the first task is spawned. So when this variable is zero, RCU9090+ * can assume that there is but one task, allowing RCU to (for example)9191+ * optimized synchronize_sched() to a simple barrier(). When this variable9292+ * is one, RCU must actually do all the hard work required to detect real9393+ * grace periods. This variable is also used to suppress boot-time false9494+ * positives from lockdep-RCU error checking.9595+ */8796int rcu_scheduler_active __read_mostly;8897EXPORT_SYMBOL_GPL(rcu_scheduler_active);9898+9999+/*100100+ * The rcu_scheduler_fully_active variable transitions from zero to one101101+ * during the early_initcall() processing, which is after the scheduler102102+ * is capable of creating new tasks. So RCU processing (for example,103103+ * creating tasks for RCU priority boosting) must be delayed until after104104+ * rcu_scheduler_fully_active transitions from zero to one. We also105105+ * currently delay invocation of any RCU callbacks until after this point.106106+ *107107+ * It might later prove better for people registering RCU callbacks during108108+ * early boot to take responsibility for these callbacks, but one step at109109+ * a time.110110+ */111111+static int rcu_scheduler_fully_active __read_mostly;8911290113#ifdef CONFIG_RCU_BOOST91114···12198DEFINE_PER_CPU(int, rcu_cpu_kthread_cpu);12299DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);123100DEFINE_PER_CPU(char, rcu_cpu_has_work);124124-static char rcu_kthreads_spawnable;125101126102#endif /* #ifdef CONFIG_RCU_BOOST */127103···14891467 */14901468static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)14911469{14701470+ if (unlikely(!ACCESS_ONCE(rcu_scheduler_fully_active)))14711471+ return;14921472 if (likely(!rsp->boost)) {14931473 rcu_do_batch(rsp, rdp);14941474 return;
+11-4
kernel/rcutree_plugin.h
···15321532 struct sched_param sp;15331533 struct task_struct *t;1534153415351535- if (!rcu_kthreads_spawnable ||15351535+ if (!rcu_scheduler_fully_active ||15361536 per_cpu(rcu_cpu_kthread_task, cpu) != NULL)15371537 return 0;15381538 t = kthread_create(rcu_cpu_kthread, (void *)(long)cpu, "rcuc%d", cpu);···16391639 struct sched_param sp;16401640 struct task_struct *t;1641164116421642- if (!rcu_kthreads_spawnable ||16421642+ if (!rcu_scheduler_fully_active ||16431643 rnp->qsmaskinit == 0)16441644 return 0;16451645 if (rnp->node_kthread_task == NULL) {···16651665 int cpu;16661666 struct rcu_node *rnp;1667166716681668- rcu_kthreads_spawnable = 1;16681668+ rcu_scheduler_fully_active = 1;16691669 for_each_possible_cpu(cpu) {16701670 per_cpu(rcu_cpu_has_work, cpu) = 0;16711671 if (cpu_online(cpu))···16871687 struct rcu_node *rnp = rdp->mynode;1688168816891689 /* Fire up the incoming CPU's kthread and leaf rcu_node kthread. */16901690- if (rcu_kthreads_spawnable) {16901690+ if (rcu_scheduler_fully_active) {16911691 (void)rcu_spawn_one_cpu_kthread(cpu);16921692 if (rnp->node_kthread_task == NULL)16931693 (void)rcu_spawn_one_node_kthread(rcu_state, rnp);···17251725static void rcu_cpu_kthread_setrt(int cpu, int to_rt)17261726{17271727}17281728+17291729+static int __init rcu_scheduler_really_started(void)17301730+{17311731+ rcu_scheduler_fully_active = 1;17321732+ return 0;17331733+}17341734+early_initcall(rcu_scheduler_really_started);1728173517291736static void __cpuinit rcu_prepare_kthreads(int cpu)17301737{
···23102310 for (i = 0; i <= classzone_idx; i++)23112311 present_pages += pgdat->node_zones[i].present_pages;2312231223132313- return balanced_pages > (present_pages >> 2);23132313+ /* A special case here: if zone has no page, we think it's balanced */23142314+ return balanced_pages >= (present_pages >> 2);23142315}2315231623162317/* is kswapd sleeping prematurely? */
···763763 struct sock *parent = bt_sk(sk)->parent;764764 rsp.result = cpu_to_le16(L2CAP_CR_PEND);765765 rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);766766- parent->sk_data_ready(parent, 0);766766+ if (parent)767767+ parent->sk_data_ready(parent, 0);767768768769 } else {769770 l2cap_state_change(chan, BT_CONFIG);···2524252325252524 sk = chan->sk;2526252525272527- if ((bt_sk(sk)->defer_setup && chan->state != BT_CONNECT2) ||25282528- (!bt_sk(sk)->defer_setup && chan->state != BT_CONFIG)) {25262526+ if (chan->state != BT_CONFIG && chan->state != BT_CONNECT2) {25292527 struct l2cap_cmd_rej_cid rej;2530252825312529 rej.reason = cpu_to_le16(L2CAP_REJ_INVALID_CID);···41504150 struct sock *parent = bt_sk(sk)->parent;41514151 res = L2CAP_CR_PEND;41524152 stat = L2CAP_CS_AUTHOR_PEND;41534153- parent->sk_data_ready(parent, 0);41534153+ if (parent)41544154+ parent->sk_data_ready(parent, 0);41544155 } else {41554156 l2cap_state_change(chan, BT_CONFIG);41564157 res = L2CAP_CR_SUCCESS;
+10-7
net/ceph/ceph_fs.c
···3636 if ((flags & O_DIRECTORY) == O_DIRECTORY)3737 return CEPH_FILE_MODE_PIN;3838#endif3939- if ((flags & O_APPEND) == O_APPEND)4040- flags |= O_WRONLY;41394242- if ((flags & O_ACCMODE) == O_RDWR)4343- mode = CEPH_FILE_MODE_RDWR;4444- else if ((flags & O_ACCMODE) == O_WRONLY)4040+ switch (flags & O_ACCMODE) {4141+ case O_WRONLY:4542 mode = CEPH_FILE_MODE_WR;4646- else4343+ break;4444+ case O_RDONLY:4745 mode = CEPH_FILE_MODE_RD;4848-4646+ break;4747+ case O_RDWR:4848+ case O_ACCMODE: /* this is what the VFS does */4949+ mode = CEPH_FILE_MODE_RDWR;5050+ break;5151+ }4952#ifdef O_LAZY5053 if (flags & O_LAZY)5154 mode |= CEPH_FILE_MODE_LAZY;
+8-11
net/sctp/output.c
···500500 * Note: Adler-32 is no longer applicable, as has been replaced501501 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.502502 */503503- if (!sctp_checksum_disable &&504504- !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) {505505- __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);503503+ if (!sctp_checksum_disable) {504504+ if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) {505505+ __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);506506507507- /* 3) Put the resultant value into the checksum field in the508508- * common header, and leave the rest of the bits unchanged.509509- */510510- sh->checksum = sctp_end_cksum(crc32);511511- } else {512512- if (dst->dev->features & NETIF_F_SCTP_CSUM) {507507+ /* 3) Put the resultant value into the checksum field in the508508+ * common header, and leave the rest of the bits unchanged.509509+ */510510+ sh->checksum = sctp_end_cksum(crc32);511511+ } else {513512 /* no need to seed pseudo checksum for SCTP */514513 nskb->ip_summed = CHECKSUM_PARTIAL;515514 nskb->csum_start = (skb_transport_header(nskb) -516515 nskb->head);517516 nskb->csum_offset = offsetof(struct sctphdr, checksum);518518- } else {519519- nskb->ip_summed = CHECKSUM_UNNECESSARY;520517 }521518 }522519