trouble with __aquires(lock) __releases(lock)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Im trying to use macros from include/linux/compiler.h
and theyre giving me warnings that dont look right.

after thrashing on my own hacks, I looked to well established uses for guidance.
But make C=1 fs/file.o also gives errors, similar to mine.

What am I missing ?
or has some bitrot set in ?

 202static int expand_fdtable(struct files_struct *files, int nr)
 203        __releases(files->file_lock)
 204        __acquires(files->file_lock)
 205{
 206        struct fdtable *new_fdt, *cur_fdt;
 207
 208        spin_unlock(&files->file_lock);
 209        new_fdt = alloc_fdtable(nr);
 210        spin_lock(&files->file_lock);
...

 247int expand_files(struct files_struct *files, int nr)
 248{
 ...
268        /* All good, so we try */
 269        return expand_fdtable(files, nr);
 270}


  CHECK   /home/jimc/projects/lx/linux-2.6/fs/file.c
/home/jimc/projects/lx/linux-2.6/fs/file.c:32:5: warning: symbol
'sysctl_nr_open_min' was not declared. Should it be static?
/home/jimc/projects/lx/linux-2.6/fs/file.c:33:5: warning: symbol
'sysctl_nr_open_max' was not declared. Should it be static?
/home/jimc/projects/lx/linux-2.6/fs/file.c:416:21: warning: symbol
'init_files' was not declared. Should it be static?
/home/jimc/projects/lx/linux-2.6/include/linux/spinlock.h:325:2:
warning: context problem in 'expand_fdtable': '_raw_spin_unlock'
expected different context
/home/jimc/projects/lx/linux-2.6/include/linux/spinlock.h:325:2:
context 'lock': wanted >= 1, got 0
/home/jimc/projects/lx/linux-2.6/fs/file.c:269:23: warning: context
problem in 'expand_files': 'expand_fdtable' expected different context
/home/jimc/projects/lx/linux-2.6/fs/file.c:269:23:    context
'file_lock': wanted >= 1, got 0

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux