make get_file() return its argument
[linux-2.6-block.git] / include / linux / fs.h
index aa110476a95be0b1d479555346c560d45ecc0b20..de1db1c12080323c2edd4ee1a11c010d63816ba2 100644 (file)
@@ -1074,7 +1074,11 @@ struct file_handle {
        unsigned char f_handle[0];
 };
 
-#define get_file(x)    atomic_long_inc(&(x)->f_count)
+static inline struct file *get_file(struct file *f)
+{
+       atomic_long_inc(&f->f_count);
+       return f;
+}
 #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
 #define file_count(x)  atomic_long_read(&(x)->f_count)